Skip to content
/ eigenmvn Public

C++11 multivariate normal distribution sampling using Eigen matrices

License

Notifications You must be signed in to change notification settings

beniz/eigenmvn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eigenmvn

Multivariate Normal distribution sampling using C++11 and Eigen matrices.

This is taken from http://stackoverflow.com/questions/16361226/error-while-creating-object-from-templated-class (also see http://lost-found-wandering.blogspot.fr/2011/05/sampling-from-multivariate-normal-in-c.html)

I have been unable to contact the original author, and I've performed the following modifications to the original code:

Usage

Compile the test exe with

g++ -I/usr/include -I/usr/include/eigen3 -g -std=c++11 test_eigenmvn.cc -o te

run with

./te

Look at results with gnuplot:

gnuplot
plot 'samples_solver.txt', 'samples_cholesky.txt'

alt text

About

C++11 multivariate normal distribution sampling using Eigen matrices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages