Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.56 KB

README.md

File metadata and controls

29 lines (24 loc) · 1.56 KB

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