25 #ifndef LSST_JOINTCAL_EIGENSTUFF_H 
   26 #define LSST_JOINTCAL_EIGENSTUFF_H 
   30 #include "Eigen/CholmodSupport"   
   33 typedef Eigen::Matrix<double, Eigen::Dynamic, 2> 
MatrixX2d;
 
   49 template <
typename _MatrixType, 
int _UpLo = Eigen::Lower>
 
   51         : 
public Eigen::CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT2<_MatrixType, _UpLo>> {
 
   52     typedef Eigen::CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT2> Base;
 
   53     using Base::m_cholmod;
 
   57     typedef typename MatrixType::Index 
Index;
 
   64         this->compute(matrix);
 
   70         Index const size = Base::m_cholmodFactor->n;
 
   71         EIGEN_UNUSED_VARIABLE(size);
 
   72         eigen_assert(size == H.rows());
 
   74         cholmod_sparse C_cs = viewAsCholmod(H);
 
   78         cholmod_sparse *C_cs_perm =
 
   79                 cholmod_l_submatrix(&C_cs, (Eigen::Index*)Base::m_cholmodFactor->Perm,
 
   80                                   Base::m_cholmodFactor->n, 
nullptr, -1, 
true, 
true, &this->cholmod());
 
   82         int isOk = cholmod_l_updown(UpOrDown, C_cs_perm, Base::m_cholmodFactor, &this->cholmod());
 
   83         cholmod_l_free_sparse(&C_cs_perm, &this->cholmod());
 
   91         m_cholmod.final_asis = 1;
 
   92         m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;
 
   95         Base::m_shiftOffset[0] = Base::m_shiftOffset[1] = 
RealScalar(0.0);
 
   99 #endif  // LSST_JOINTCAL_EIGENSTUFF_H