/** * @file CholeskyRobust.h * @author Erik Rodner * @date 01/06/2010 */ #ifndef _NICE_OBJREC_CHOLESKYROBUSTINCLUDE #define _NICE_OBJREC_CHOLESKYROBUSTINCLUDE #include #include "core/vector/MatrixT.h" namespace OBJREC { /** @class CholeskyRobust * robust cholesky decomposition by adding some noise * * @author Erik Rodner */ class CholeskyRobust { protected: const bool m_verbose; const double m_noiseStep; const double m_minMatrixLogDeterminant; const bool m_useCuda; double m_logDetMatrix; public: CholeskyRobust ( bool verbose = true, double noiseStep = 1e-8, double minMatrixLogDeterminant = - std::numeric_limits::max(), bool useCuda = true ); CholeskyRobust ( const CholeskyRobust & src ); virtual ~CholeskyRobust (); virtual double robustChol ( const NICE::Matrix & A, NICE::Matrix & cholA ); virtual double robustCholInv ( const NICE::Matrix & A, NICE::Matrix & invA ); double getLastLogDet () const { return m_logDetMatrix; }; virtual CholeskyRobust *clone(void) const; }; } #endif