use the new cholesky api in edoSamplerNormalMulti

This commit is contained in:
nojhan 2011-12-23 16:31:35 +01:00
commit 4805f72a80

View file

@ -32,6 +32,7 @@ Authors:
#include <limits> #include <limits>
#include <edoSampler.h> #include <edoSampler.h>
#include <utils/edoCholesky.h>
#include <boost/numeric/ublas/lu.hpp> #include <boost/numeric/ublas/lu.hpp>
#include <boost/numeric/ublas/symmetric.hpp> #include <boost/numeric/ublas/symmetric.hpp>
@ -48,8 +49,8 @@ class edoSamplerNormalMulti : public edoSampler< EOD >
public: public:
typedef typename EOT::AtomType AtomType; typedef typename EOT::AtomType AtomType;
edoSamplerNormalMulti( edoRepairer<EOT> & repairer, typename Cholesky::Method use = Cholesky::absolute ) edoSamplerNormalMulti( edoRepairer<EOT> & repairer )
: edoSampler< EOD >( repairer), _cholesky(use) : edoSampler< EOD >( repairer)
{} {}
@ -59,7 +60,7 @@ public:
assert(size > 0); assert(size > 0);
// L = cholesky decomposition of varcovar // L = cholesky decomposition of varcovar
const typename Cholesky::FactorMat& L = _cholesky( distrib.varcovar() ); const typename cholesky::CholeskyBase<AtomType>::FactorMat& L = _cholesky( distrib.varcovar() );
// T = vector of size elements drawn in N(0,1) // T = vector of size elements drawn in N(0,1)
ublas::vector< AtomType > T( size ); ublas::vector< AtomType > T( size );
@ -80,7 +81,7 @@ public:
} }
protected: protected:
Cholesky _cholesky; cholesky::CholeskyLLT<AtomType> _cholesky;
}; };
#endif // !_edoSamplerNormalMulti_h #endif // !_edoSamplerNormalMulti_h