SimplicialCholesky.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2012 Gael Guennebaud <gael.guennebaud@inria.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_SIMPLICIAL_CHOLESKY_H
11 #define EIGEN_SIMPLICIAL_CHOLESKY_H
12 
13 namespace Eigen {
14 
18 };
19 
20 namespace internal {
21  template<typename CholMatrixType, typename InputMatrixType>
23  typedef CholMatrixType const * ConstCholMatrixPtr;
24  static void run(const InputMatrixType& input, ConstCholMatrixPtr &pmat, CholMatrixType &tmp)
25  {
26  tmp = input;
27  pmat = &tmp;
28  }
29  };
30 
31  template<typename MatrixType>
33  typedef MatrixType const * ConstMatrixPtr;
34  static void run(const MatrixType& input, ConstMatrixPtr &pmat, MatrixType &/*tmp*/)
35  {
36  pmat = &input;
37  }
38  };
39 } // end namespace internal
40 
54 template<typename Derived>
56 {
59 
60  public:
64  typedef typename MatrixType::Scalar Scalar;
66  typedef typename MatrixType::StorageIndex StorageIndex;
71 
72  enum {
73  ColsAtCompileTime = MatrixType::ColsAtCompileTime,
74  MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
75  };
76 
77  public:
78 
79  using Base::derived;
80 
83  : m_info(Success),
84  m_factorizationIsOk(false),
85  m_analysisIsOk(false),
86  m_shiftOffset(0),
87  m_shiftScale(1)
88  {}
89 
91  : m_info(Success),
92  m_factorizationIsOk(false),
93  m_analysisIsOk(false),
94  m_shiftOffset(0),
95  m_shiftScale(1)
96  {
97  derived().compute(matrix);
98  }
99 
101  {
102  }
103 
104  Derived& derived() { return *static_cast<Derived*>(this); }
105  const Derived& derived() const { return *static_cast<const Derived*>(this); }
106 
107  inline Index cols() const { return m_matrix.cols(); }
108  inline Index rows() const { return m_matrix.rows(); }
109 
116  {
117  eigen_assert(m_isInitialized && "Decomposition is not initialized.");
118  return m_info;
119  }
120 
124  { return m_P; }
125 
129  { return m_Pinv; }
130 
140  Derived& setShift(const RealScalar& offset, const RealScalar& scale = 1)
141  {
144  return derived();
145  }
146 
147 #ifndef EIGEN_PARSED_BY_DOXYGEN
148 
149  template<typename Stream>
150  void dumpMemory(Stream& s)
151  {
152  int total = 0;
153  s << " L: " << ((total+=(m_matrix.cols()+1) * sizeof(int) + m_matrix.nonZeros()*(sizeof(int)+sizeof(Scalar))) >> 20) << "Mb" << "\n";
154  s << " diag: " << ((total+=m_diag.size() * sizeof(Scalar)) >> 20) << "Mb" << "\n";
155  s << " tree: " << ((total+=m_parent.size() * sizeof(int)) >> 20) << "Mb" << "\n";
156  s << " nonzeros: " << ((total+=m_nonZerosPerCol.size() * sizeof(int)) >> 20) << "Mb" << "\n";
157  s << " perm: " << ((total+=m_P.size() * sizeof(int)) >> 20) << "Mb" << "\n";
158  s << " perm^-1: " << ((total+=m_Pinv.size() * sizeof(int)) >> 20) << "Mb" << "\n";
159  s << " TOTAL: " << (total>> 20) << "Mb" << "\n";
160  }
161 
163  template<typename Rhs,typename Dest>
164  void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const
165  {
166  eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()");
167  eigen_assert(m_matrix.rows()==b.rows());
168 
169  if(m_info!=Success)
170  return;
171 
172  if(m_P.size()>0)
173  dest = m_P * b;
174  else
175  dest = b;
176 
177  if(m_matrix.nonZeros()>0) // otherwise L==I
178  derived().matrixL().solveInPlace(dest);
179 
180  if(m_diag.size()>0)
181  dest = m_diag.asDiagonal().inverse() * dest;
182 
183  if (m_matrix.nonZeros()>0) // otherwise U==I
184  derived().matrixU().solveInPlace(dest);
185 
186  if(m_P.size()>0)
187  dest = m_Pinv * dest;
188  }
189 
190  template<typename Rhs,typename Dest>
192  {
194  }
195 
196 #endif // EIGEN_PARSED_BY_DOXYGEN
197 
198  protected:
199 
201  template<bool DoLDLT>
202  void compute(const MatrixType& matrix)
203  {
204  eigen_assert(matrix.rows()==matrix.cols());
205  Index size = matrix.cols();
206  CholMatrixType tmp(size,size);
207  ConstCholMatrixPtr pmat;
208  ordering(matrix, pmat, tmp);
209  analyzePattern_preordered(*pmat, DoLDLT);
210  factorize_preordered<DoLDLT>(*pmat);
211  }
212 
213  template<bool DoLDLT>
214  void factorize(const MatrixType& a)
215  {
216  eigen_assert(a.rows()==a.cols());
217  Index size = a.cols();
218  CholMatrixType tmp(size,size);
219  ConstCholMatrixPtr pmat;
220 
221  if(m_P.size() == 0 && (int(UpLo) & int(Upper)) == Upper)
222  {
223  // If there is no ordering, try to directly use the input matrix without any copy
225  }
226  else
227  {
228  tmp.template selfadjointView<Upper>() = a.template selfadjointView<UpLo>().twistedBy(m_P);
229  pmat = &tmp;
230  }
231 
232  factorize_preordered<DoLDLT>(*pmat);
233  }
234 
235  template<bool DoLDLT>
237 
238  void analyzePattern(const MatrixType& a, bool doLDLT)
239  {
240  eigen_assert(a.rows()==a.cols());
241  Index size = a.cols();
242  CholMatrixType tmp(size,size);
243  ConstCholMatrixPtr pmat;
244  ordering(a, pmat, tmp);
245  analyzePattern_preordered(*pmat,doLDLT);
246  }
247  void analyzePattern_preordered(const CholMatrixType& a, bool doLDLT);
248 
249  void ordering(const MatrixType& a, ConstCholMatrixPtr &pmat, CholMatrixType& ap);
250 
252  struct keep_diag {
253  inline bool operator() (const Index& row, const Index& col, const Scalar&) const
254  {
255  return row!=col;
256  }
257  };
258 
262 
264  VectorType m_diag; // the diagonal coefficients (LDLT mode)
265  VectorI m_parent; // elimination tree
269 
272 };
273 
274 template<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialLLT;
275 template<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialLDLT;
276 template<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialCholesky;
277 
278 namespace internal {
279 
280 template<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<SimplicialLLT<_MatrixType,_UpLo,_Ordering> >
281 {
282  typedef _MatrixType MatrixType;
283  typedef _Ordering OrderingType;
284  enum { UpLo = _UpLo };
285  typedef typename MatrixType::Scalar Scalar;
286  typedef typename MatrixType::StorageIndex StorageIndex;
290  static inline MatrixL getL(const CholMatrixType& m) { return MatrixL(m); }
291  static inline MatrixU getU(const CholMatrixType& m) { return MatrixU(m.adjoint()); }
292 };
293 
294 template<typename _MatrixType,int _UpLo, typename _Ordering> struct traits<SimplicialLDLT<_MatrixType,_UpLo,_Ordering> >
295 {
296  typedef _MatrixType MatrixType;
297  typedef _Ordering OrderingType;
298  enum { UpLo = _UpLo };
299  typedef typename MatrixType::Scalar Scalar;
300  typedef typename MatrixType::StorageIndex StorageIndex;
304  static inline MatrixL getL(const CholMatrixType& m) { return MatrixL(m); }
305  static inline MatrixU getU(const CholMatrixType& m) { return MatrixU(m.adjoint()); }
306 };
307 
308 template<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<SimplicialCholesky<_MatrixType,_UpLo,_Ordering> >
309 {
310  typedef _MatrixType MatrixType;
311  typedef _Ordering OrderingType;
312  enum { UpLo = _UpLo };
313 };
314 
315 }
316 
337 template<typename _MatrixType, int _UpLo, typename _Ordering>
338  class SimplicialLLT : public SimplicialCholeskyBase<SimplicialLLT<_MatrixType,_UpLo,_Ordering> >
339 {
340 public:
341  typedef _MatrixType MatrixType;
342  enum { UpLo = _UpLo };
344  typedef typename MatrixType::Scalar Scalar;
346  typedef typename MatrixType::StorageIndex StorageIndex;
350  typedef typename Traits::MatrixL MatrixL;
351  typedef typename Traits::MatrixU MatrixU;
352 public:
356  explicit SimplicialLLT(const MatrixType& matrix)
357  : Base(matrix) {}
358 
360  inline const MatrixL matrixL() const {
361  eigen_assert(Base::m_factorizationIsOk && "Simplicial LLT not factorized");
362  return Traits::getL(Base::m_matrix);
363  }
364 
366  inline const MatrixU matrixU() const {
367  eigen_assert(Base::m_factorizationIsOk && "Simplicial LLT not factorized");
368  return Traits::getU(Base::m_matrix);
369  }
370 
373  {
374  Base::template compute<false>(matrix);
375  return *this;
376  }
377 
385  {
386  Base::analyzePattern(a, false);
387  }
388 
395  void factorize(const MatrixType& a)
396  {
397  Base::template factorize<false>(a);
398  }
399 
402  {
403  Scalar detL = Base::m_matrix.diagonal().prod();
404  return numext::abs2(detL);
405  }
406 };
407 
428 template<typename _MatrixType, int _UpLo, typename _Ordering>
429  class SimplicialLDLT : public SimplicialCholeskyBase<SimplicialLDLT<_MatrixType,_UpLo,_Ordering> >
430 {
431 public:
432  typedef _MatrixType MatrixType;
433  enum { UpLo = _UpLo };
435  typedef typename MatrixType::Scalar Scalar;
437  typedef typename MatrixType::StorageIndex StorageIndex;
441  typedef typename Traits::MatrixL MatrixL;
442  typedef typename Traits::MatrixU MatrixU;
443 public:
446 
449  : Base(matrix) {}
450 
452  inline const VectorType vectorD() const {
453  eigen_assert(Base::m_factorizationIsOk && "Simplicial LDLT not factorized");
454  return Base::m_diag;
455  }
457  inline const MatrixL matrixL() const {
458  eigen_assert(Base::m_factorizationIsOk && "Simplicial LDLT not factorized");
459  return Traits::getL(Base::m_matrix);
460  }
461 
463  inline const MatrixU matrixU() const {
464  eigen_assert(Base::m_factorizationIsOk && "Simplicial LDLT not factorized");
465  return Traits::getU(Base::m_matrix);
466  }
467 
470  {
471  Base::template compute<true>(matrix);
472  return *this;
473  }
474 
482  {
483  Base::analyzePattern(a, true);
484  }
485 
492  void factorize(const MatrixType& a)
493  {
494  Base::template factorize<true>(a);
495  }
496 
499  {
500  return Base::m_diag.prod();
501  }
502 };
503 
510 template<typename _MatrixType, int _UpLo, typename _Ordering>
511  class SimplicialCholesky : public SimplicialCholeskyBase<SimplicialCholesky<_MatrixType,_UpLo,_Ordering> >
512 {
513 public:
514  typedef _MatrixType MatrixType;
515  enum { UpLo = _UpLo };
517  typedef typename MatrixType::Scalar Scalar;
519  typedef typename MatrixType::StorageIndex StorageIndex;
525  public:
527 
529  : Base(), m_LDLT(true)
530  {
531  compute(matrix);
532  }
533 
535  {
536  switch(mode)
537  {
539  m_LDLT = false;
540  break;
542  m_LDLT = true;
543  break;
544  default:
545  break;
546  }
547 
548  return *this;
549  }
550 
551  inline const VectorType vectorD() const {
552  eigen_assert(Base::m_factorizationIsOk && "Simplicial Cholesky not factorized");
553  return Base::m_diag;
554  }
555  inline const CholMatrixType rawMatrix() const {
556  eigen_assert(Base::m_factorizationIsOk && "Simplicial Cholesky not factorized");
557  return Base::m_matrix;
558  }
559 
562  {
563  if(m_LDLT)
564  Base::template compute<true>(matrix);
565  else
566  Base::template compute<false>(matrix);
567  return *this;
568  }
569 
577  {
579  }
580 
587  void factorize(const MatrixType& a)
588  {
589  if(m_LDLT)
590  Base::template factorize<true>(a);
591  else
592  Base::template factorize<false>(a);
593  }
594 
596  template<typename Rhs,typename Dest>
597  void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const
598  {
599  eigen_assert(Base::m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()");
600  eigen_assert(Base::m_matrix.rows()==b.rows());
601 
602  if(Base::m_info!=Success)
603  return;
604 
605  if(Base::m_P.size()>0)
606  dest = Base::m_P * b;
607  else
608  dest = b;
609 
610  if(Base::m_matrix.nonZeros()>0) // otherwise L==I
611  {
612  if(m_LDLT)
613  LDLTTraits::getL(Base::m_matrix).solveInPlace(dest);
614  else
615  LLTTraits::getL(Base::m_matrix).solveInPlace(dest);
616  }
617 
618  if(Base::m_diag.size()>0)
619  dest = Base::m_diag.real().asDiagonal().inverse() * dest;
620 
621  if (Base::m_matrix.nonZeros()>0) // otherwise I==I
622  {
623  if(m_LDLT)
624  LDLTTraits::getU(Base::m_matrix).solveInPlace(dest);
625  else
626  LLTTraits::getU(Base::m_matrix).solveInPlace(dest);
627  }
628 
629  if(Base::m_P.size()>0)
630  dest = Base::m_Pinv * dest;
631  }
632 
634  template<typename Rhs,typename Dest>
636  {
638  }
639 
641  {
642  if(m_LDLT)
643  {
644  return Base::m_diag.prod();
645  }
646  else
647  {
649  return numext::abs2(detL);
650  }
651  }
652 
653  protected:
654  bool m_LDLT;
655 };
656 
657 template<typename Derived>
659 {
660  eigen_assert(a.rows()==a.cols());
661  const Index size = a.rows();
662  pmat = &ap;
663  // Note that ordering methods compute the inverse permutation
665  {
666  {
668  C = a.template selfadjointView<UpLo>();
669 
671  ordering(C,m_Pinv);
672  }
673 
674  if(m_Pinv.size()>0) m_P = m_Pinv.inverse();
675  else m_P.resize(0);
676 
677  ap.resize(size,size);
678  ap.template selfadjointView<Upper>() = a.template selfadjointView<UpLo>().twistedBy(m_P);
679  }
680  else
681  {
682  m_Pinv.resize(0);
683  m_P.resize(0);
684  if(int(UpLo)==int(Lower) || MatrixType::IsRowMajor)
685  {
686  // we have to transpose the lower part to to the upper one
687  ap.resize(size,size);
688  ap.template selfadjointView<Upper>() = a.template selfadjointView<UpLo>();
689  }
690  else
692  }
693 }
694 
695 } // end namespace Eigen
696 
697 #endif // EIGEN_SIMPLICIAL_CHOLESKY_H
Eigen::SparseMatrix::resize
void resize(Index rows, Index cols)
Definition: SparseMatrix.h:626
Eigen::SparseMatrix::cols
Index cols() const
Definition: SparseMatrix.h:140
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
Eigen::SimplicialCholeskyBase::keep_diag::operator()
bool operator()(const Index &row, const Index &col, const Scalar &) const
Definition: SimplicialCholesky.h:253
Eigen::SimplicialLDLT::matrixL
const MatrixL matrixL() const
Definition: SimplicialCholesky.h:457
Eigen::SimplicialLDLT::Traits
internal::traits< SimplicialLDLT > Traits
Definition: SimplicialCholesky.h:440
Eigen::SimplicialCholeskyBase::_solve_impl
void _solve_impl(const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
Definition: SimplicialCholesky.h:191
Eigen::SimplicialCholeskyBase::cols
Index cols() const
Definition: SimplicialCholesky.h:107
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::SparseMatrix< Scalar, ColMajor, StorageIndex >
col
m col(1)
Eigen::SimplicialCholeskyBase::factorize_preordered
void factorize_preordered(const CholMatrixType &a)
Definition: SimplicialCholesky_impl.h:76
Eigen::SimplicialCholeskyBase::VectorType
Matrix< Scalar, Dynamic, 1 > VectorType
Definition: SimplicialCholesky.h:69
Eigen::SimplicialLLT::Traits
internal::traits< SimplicialLLT > Traits
Definition: SimplicialCholesky.h:349
Eigen::SimplicialCholesky::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: SimplicialCholesky.h:519
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::MatrixU
TriangularView< const typename CholMatrixType::AdjointReturnType, Eigen::Upper > MatrixU
Definition: SimplicialCholesky.h:289
Eigen::internal::simplicial_cholesky_grab_input::ConstCholMatrixPtr
const CholMatrixType * ConstCholMatrixPtr
Definition: SimplicialCholesky.h:23
Eigen::SimplicialLDLT::MatrixL
Traits::MatrixL MatrixL
Definition: SimplicialCholesky.h:441
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::getU
static MatrixU getU(const CholMatrixType &m)
Definition: SimplicialCholesky.h:305
s
RealScalar s
Definition: level1_cplx_impl.h:126
Eigen::SimplicialCholeskyBase
A base class for direct sparse Cholesky factorizations.
Definition: SimplicialCholesky.h:55
Eigen::SimplicialLDLT::Scalar
MatrixType::Scalar Scalar
Definition: SimplicialCholesky.h:435
Eigen::SimplicialCholeskyBase::permutationPinv
const PermutationMatrix< Dynamic, Dynamic, StorageIndex > & permutationPinv() const
Definition: SimplicialCholesky.h:128
Eigen::SimplicialLDLT::SimplicialLDLT
SimplicialLDLT(const MatrixType &matrix)
Definition: SimplicialCholesky.h:448
MatrixType
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Eigen::SimplicialLDLT::matrixU
const MatrixU matrixU() const
Definition: SimplicialCholesky.h:463
Eigen::SimplicialLDLT::determinant
Scalar determinant() const
Definition: SimplicialCholesky.h:498
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: SimplicialCholesky.h:300
Eigen::SimplicialCholesky::LLTTraits
internal::traits< SimplicialLLT< MatrixType, UpLo > > LLTTraits
Definition: SimplicialCholesky.h:524
Eigen::SimplicialLLT::MatrixU
Traits::MatrixU MatrixU
Definition: SimplicialCholesky.h:351
Eigen::SimplicialLDLT::compute
SimplicialLDLT & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:469
b
Scalar * b
Definition: benchVecAdd.cpp:17
Eigen::SimplicialLDLT
A direct sparse LDLT Cholesky factorizations without square root.
Definition: SimplicialCholesky.h:275
Eigen::SimplicialCholeskyBase::SimplicialCholeskyBase
SimplicialCholeskyBase()
Definition: SimplicialCholesky.h:82
Eigen::SimplicialLDLT::RealScalar
MatrixType::RealScalar RealScalar
Definition: SimplicialCholesky.h:436
Eigen::SimplicialCholeskyBase::m_nonZerosPerCol
VectorI m_nonZerosPerCol
Definition: SimplicialCholesky.h:266
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::internal::simplicial_cholesky_grab_input
Definition: SimplicialCholesky.h:22
Eigen::SimplicialCholesky::UpLo
@ UpLo
Definition: SimplicialCholesky.h:515
Eigen::SimplicialLLT::analyzePattern
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:384
Eigen::Upper
@ Upper
Definition: Constants.h:211
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::CholMatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > CholMatrixType
Definition: SimplicialCholesky.h:287
Eigen::Success
@ Success
Definition: Constants.h:442
Eigen::internal::simplicial_cholesky_grab_input< MatrixType, MatrixType >::ConstMatrixPtr
const MatrixType * ConstMatrixPtr
Definition: SimplicialCholesky.h:33
Eigen::SimplicialLDLT::factorize
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:492
Eigen::SimplicialCholeskyBase::m_info
ComputationInfo m_info
Definition: SimplicialCholesky.h:259
Eigen::SimplicialCholeskyBase::m_matrix
CholMatrixType m_matrix
Definition: SimplicialCholesky.h:263
Eigen::SimplicialLDLT::UpLo
@ UpLo
Definition: SimplicialCholesky.h:433
Eigen::SimplicialCholeskyBase::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: SimplicialCholesky.h:66
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::OrderingType
_Ordering OrderingType
Definition: SimplicialCholesky.h:283
Eigen::SimplicialCholeskyBase::m_shiftScale
RealScalar m_shiftScale
Definition: SimplicialCholesky.h:271
Eigen::SparseMatrix::nonZeros
Index nonZeros() const
Definition: SparseCompressedBase.h:56
Eigen::SimplicialCholeskyBase::info
ComputationInfo info() const
Reports whether previous computation was successful.
Definition: SimplicialCholesky.h:115
Eigen::SimplicialLDLT::VectorType
Matrix< Scalar, Dynamic, 1 > VectorType
Definition: SimplicialCholesky.h:439
Eigen::SimplicialCholesky::SimplicialCholesky
SimplicialCholesky()
Definition: SimplicialCholesky.h:526
Eigen::SimplicialCholeskyBase::permutationP
const PermutationMatrix< Dynamic, Dynamic, StorageIndex > & permutationP() const
Definition: SimplicialCholesky.h:123
Eigen::SimplicialLDLT::vectorD
const VectorType vectorD() const
Definition: SimplicialCholesky.h:452
Eigen::SimplicialLLT
A direct sparse LLT Cholesky factorizations.
Definition: SimplicialCholesky.h:274
Eigen::SimplicialCholeskyBase::m_parent
VectorI m_parent
Definition: SimplicialCholesky.h:265
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::MatrixL
TriangularView< const CholMatrixType, Eigen::UnitLower > MatrixL
Definition: SimplicialCholesky.h:302
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::SimplicialCholeskyBase::m_Pinv
PermutationMatrix< Dynamic, Dynamic, StorageIndex > m_Pinv
Definition: SimplicialCholesky.h:268
Eigen::SimplicialLLT::CholMatrixType
SparseMatrix< Scalar, ColMajor, Index > CholMatrixType
Definition: SimplicialCholesky.h:347
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::Scalar
MatrixType::Scalar Scalar
Definition: SimplicialCholesky.h:299
Eigen::SimplicialCholeskyBase::CholMatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > CholMatrixType
Definition: SimplicialCholesky.h:67
Eigen::SimplicialCholesky::Base
SimplicialCholeskyBase< SimplicialCholesky > Base
Definition: SimplicialCholesky.h:516
Eigen::SimplicialCholesky::_solve_impl
void _solve_impl(const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
Definition: SimplicialCholesky.h:635
Eigen::SimplicialCholeskyBase::ConstCholMatrixPtr
const CholMatrixType * ConstCholMatrixPtr
Definition: SimplicialCholesky.h:68
size
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Eigen::SimplicialCholeskyBase::setShift
Derived & setShift(const RealScalar &offset, const RealScalar &scale=1)
Definition: SimplicialCholesky.h:140
Eigen::SimplicialCholesky::_solve_impl
void _solve_impl(const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const
Definition: SimplicialCholesky.h:597
Eigen::SimplicialLLT::matrixL
const MatrixL matrixL() const
Definition: SimplicialCholesky.h:360
Eigen::SimplicialLLT::RealScalar
MatrixType::RealScalar RealScalar
Definition: SimplicialCholesky.h:345
Eigen::internal::traits< SimplicialCholesky< _MatrixType, _UpLo, _Ordering > >::MatrixType
_MatrixType MatrixType
Definition: SimplicialCholesky.h:310
Eigen::SparseMatrix::diagonal
const ConstDiagonalReturnType diagonal() const
Definition: SparseMatrix.h:655
Eigen::SimplicialCholeskyBase::Base
SparseSolverBase< Derived > Base
Definition: SimplicialCholesky.h:57
Eigen::SimplicialCholeskyLLT
@ SimplicialCholeskyLLT
Definition: SimplicialCholesky.h:16
Eigen::SimplicialCholeskyBase::RealScalar
MatrixType::RealScalar RealScalar
Definition: SimplicialCholesky.h:65
Eigen::SimplicialCholeskyBase::_solve_impl
void _solve_impl(const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const
Definition: SimplicialCholesky.h:164
Eigen::SimplicialLLT::VectorType
Matrix< Scalar, Dynamic, 1 > VectorType
Definition: SimplicialCholesky.h:348
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::CholMatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > CholMatrixType
Definition: SimplicialCholesky.h:301
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::getU
static MatrixU getU(const CholMatrixType &m)
Definition: SimplicialCholesky.h:291
Eigen::SimplicialCholeskyBase::factorize
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:214
scale
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics scale
Definition: gnuplot_common_settings.hh:54
Eigen::SimplicialCholeskyBase::Scalar
MatrixType::Scalar Scalar
Definition: SimplicialCholesky.h:64
Eigen::SimplicialCholesky::VectorType
Matrix< Scalar, Dynamic, 1 > VectorType
Definition: SimplicialCholesky.h:521
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::OrderingType
_Ordering OrderingType
Definition: SimplicialCholesky.h:297
Eigen::SimplicialCholesky::MatrixType
_MatrixType MatrixType
Definition: SimplicialCholesky.h:514
Eigen::SimplicialLDLT::SimplicialLDLT
SimplicialLDLT()
Definition: SimplicialCholesky.h:445
mode
static const DiscreteKey mode(modeKey, 2)
Eigen::SimplicialCholeskyBase::SimplicialCholeskyBase
SimplicialCholeskyBase(const MatrixType &matrix)
Definition: SimplicialCholesky.h:90
Eigen::SimplicialCholesky::rawMatrix
const CholMatrixType rawMatrix() const
Definition: SimplicialCholesky.h:555
Eigen::SimplicialLLT::MatrixType
_MatrixType MatrixType
Definition: SimplicialCholesky.h:341
Eigen::Diagonal
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:63
Eigen::SimplicialCholeskyBase::m_diag
VectorType m_diag
Definition: SimplicialCholesky.h:264
Eigen::SimplicialCholeskyBase::ColsAtCompileTime
@ ColsAtCompileTime
Definition: SimplicialCholesky.h:73
Eigen::SimplicialCholesky::analyzePattern
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:576
Eigen::SimplicialLLT::Base
SimplicialCholeskyBase< SimplicialLLT > Base
Definition: SimplicialCholesky.h:343
Eigen::SimplicialCholeskyLDLT
@ SimplicialCholeskyLDLT
Definition: SimplicialCholesky.h:17
Eigen::internal::traits< SimplicialCholesky< _MatrixType, _UpLo, _Ordering > >::OrderingType
_Ordering OrderingType
Definition: SimplicialCholesky.h:311
Eigen::SimplicialCholeskyBase::analyzePattern
void analyzePattern(const MatrixType &a, bool doLDLT)
Definition: SimplicialCholesky.h:238
Eigen::SimplicialLDLT::Base
SimplicialCholeskyBase< SimplicialLDLT > Base
Definition: SimplicialCholesky.h:434
Eigen::SimplicialLDLT::MatrixU
Traits::MatrixU MatrixU
Definition: SimplicialCholesky.h:442
Eigen::SimplicialCholeskyBase::ordering
void ordering(const MatrixType &a, ConstCholMatrixPtr &pmat, CholMatrixType &ap)
Definition: SimplicialCholesky.h:658
Eigen::SimplicialCholeskyBase::derived
Derived & derived()
Definition: SimplicialCholesky.h:104
Eigen::SimplicialCholesky::setMode
SimplicialCholesky & setMode(SimplicialCholeskyMode mode)
Definition: SimplicialCholesky.h:534
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
Eigen::SimplicialLDLT::MatrixType
_MatrixType MatrixType
Definition: SimplicialCholesky.h:432
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::Scalar
MatrixType::Scalar Scalar
Definition: SimplicialCholesky.h:285
Eigen::SimplicialLLT::MatrixL
Traits::MatrixL MatrixL
Definition: SimplicialCholesky.h:350
Eigen::SimplicialLDLT::CholMatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > CholMatrixType
Definition: SimplicialCholesky.h:438
Eigen::Lower
@ Lower
Definition: Constants.h:209
Eigen::SimplicialCholeskyBase::m_factorizationIsOk
bool m_factorizationIsOk
Definition: SimplicialCholesky.h:260
Eigen::SimplicialCholesky::factorize
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:587
Eigen::SimplicialLLT::matrixU
const MatrixU matrixU() const
Definition: SimplicialCholesky.h:366
Eigen::SimplicialCholesky::vectorD
const VectorType vectorD() const
Definition: SimplicialCholesky.h:551
ordering
static enum @1096 ordering
matrix
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: gtsam/3rdparty/Eigen/blas/common.h:110
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::getL
static MatrixL getL(const CholMatrixType &m)
Definition: SimplicialCholesky.h:290
offset
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate offset
Definition: gnuplot_common_settings.hh:64
Eigen::SimplicialCholesky
Definition: SimplicialCholesky.h:276
Eigen::SimplicialCholeskyBase::m_analysisIsOk
bool m_analysisIsOk
Definition: SimplicialCholesky.h:261
Eigen::SimplicialLLT::SimplicialLLT
SimplicialLLT()
Definition: SimplicialCholesky.h:354
Eigen::SimplicialCholesky::RealScalar
MatrixType::RealScalar RealScalar
Definition: SimplicialCholesky.h:518
RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:47
Eigen::SimplicialLLT::Scalar
MatrixType::Scalar Scalar
Definition: SimplicialCholesky.h:344
Eigen::SimplicialCholeskyBase::MaxColsAtCompileTime
@ MaxColsAtCompileTime
Definition: SimplicialCholesky.h:74
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
Eigen::PermutationBase::size
EIGEN_DEVICE_FUNC Index size() const
Definition: PermutationMatrix.h:97
Eigen::SimplicialCholeskyBase::derived
const Derived & derived() const
Definition: SimplicialCholesky.h:105
Eigen::SparseSolverBase
A base class for sparse solvers.
Definition: SparseSolverBase.h:67
Eigen::numext::abs2
EIGEN_DEVICE_FUNC bool abs2(bool x)
Definition: Eigen/src/Core/MathFunctions.h:1294
Eigen::SimplicialLDLT::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: SimplicialCholesky.h:437
C
Matrix< Scalar, Dynamic, Dynamic > C
Definition: bench_gemm.cpp:50
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::SimplicialCholeskyMode
SimplicialCholeskyMode
Definition: SimplicialCholesky.h:15
Eigen::SparseSolverBase::derived
Derived & derived()
Definition: SparseSolverBase.h:79
Eigen::SimplicialLLT::UpLo
@ UpLo
Definition: SimplicialCholesky.h:342
Eigen::SimplicialCholeskyBase::analyzePattern_preordered
void analyzePattern_preordered(const CholMatrixType &a, bool doLDLT)
Definition: SimplicialCholesky_impl.h:26
row
m row(1)
Eigen::PermutationMatrix< Dynamic, Dynamic, StorageIndex >
Eigen::SimplicialCholeskyBase::OrderingType
internal::traits< Derived >::OrderingType OrderingType
Definition: SimplicialCholesky.h:62
Eigen::SimplicialCholeskyBase::MatrixType
internal::traits< Derived >::MatrixType MatrixType
Definition: SimplicialCholesky.h:61
Eigen::SimplicialCholeskyBase::rows
Index rows() const
Definition: SimplicialCholesky.h:108
Eigen::SimplicialCholesky::m_LDLT
bool m_LDLT
Definition: SimplicialCholesky.h:654
Eigen::SimplicialCholeskyBase::keep_diag
Definition: SimplicialCholesky.h:252
Eigen::SimplicialCholesky::Scalar
MatrixType::Scalar Scalar
Definition: SimplicialCholesky.h:517
Eigen::internal::solve_sparse_through_dense_panels
enable_if< Rhs::ColsAtCompileTime!=1 &&Dest::ColsAtCompileTime!=1 >::type solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs &rhs, Dest &dest)
Definition: SparseSolverBase.h:23
Eigen::SimplicialCholeskyBase::UpLo
@ UpLo
Definition: SimplicialCholesky.h:63
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::MatrixU
TriangularView< const typename CholMatrixType::AdjointReturnType, Eigen::UnitUpper > MatrixU
Definition: SimplicialCholesky.h:303
Eigen::SparseMatrixBase
Base class of any sparse matrices or sparse expressions.
Definition: ForwardDeclarations.h:301
Eigen::SimplicialLDLT::analyzePattern
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:481
Eigen::SimplicialCholeskyBase::dumpMemory
void dumpMemory(Stream &s)
Definition: SimplicialCholesky.h:150
Eigen::internal::simplicial_cholesky_grab_input< MatrixType, MatrixType >::run
static void run(const MatrixType &input, ConstMatrixPtr &pmat, MatrixType &)
Definition: SimplicialCholesky.h:34
Eigen::internal::is_same
Definition: Meta.h:148
Eigen::SimplicialCholesky::Traits
internal::traits< SimplicialCholesky > Traits
Definition: SimplicialCholesky.h:522
Eigen::SimplicialCholesky::compute
SimplicialCholesky & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:561
Eigen::Matrix< Scalar, Dynamic, 1 >
Eigen::SimplicialCholeskyBase::compute
void compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:202
internal
Definition: BandTriangularSolver.h:13
Eigen::SimplicialLLT::SimplicialLLT
SimplicialLLT(const MatrixType &matrix)
Definition: SimplicialCholesky.h:356
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::getL
static MatrixL getL(const CholMatrixType &m)
Definition: SimplicialCholesky.h:304
Eigen::SimplicialCholeskyBase::m_P
PermutationMatrix< Dynamic, Dynamic, StorageIndex > m_P
Definition: SimplicialCholesky.h:267
Eigen::SimplicialLLT::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: SimplicialCholesky.h:346
Eigen::SimplicialCholesky::LDLTTraits
internal::traits< SimplicialLDLT< MatrixType, UpLo > > LDLTTraits
Definition: SimplicialCholesky.h:523
Eigen::SimplicialCholesky::determinant
Scalar determinant() const
Definition: SimplicialCholesky.h:640
Eigen::SimplicialCholesky::SimplicialCholesky
SimplicialCholesky(const MatrixType &matrix)
Definition: SimplicialCholesky.h:528
Eigen::ComputationInfo
ComputationInfo
Definition: Constants.h:440
Eigen::SparseMatrix::rows
Index rows() const
Definition: SparseMatrix.h:138
Eigen::TriangularView
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:187
Eigen::SimplicialCholeskyBase::m_shiftOffset
RealScalar m_shiftOffset
Definition: SimplicialCholesky.h:270
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::MatrixL
TriangularView< const CholMatrixType, Eigen::Lower > MatrixL
Definition: SimplicialCholesky.h:288
Eigen::NaturalOrdering
Definition: 3rdparty/Eigen/Eigen/src/OrderingMethods/Ordering.h:91
test_callbacks.value
value
Definition: test_callbacks.py:160
Eigen::SimplicialLLT::compute
SimplicialLLT & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:372
Eigen::SimplicialCholeskyBase::VectorI
Matrix< StorageIndex, Dynamic, 1 > VectorI
Definition: SimplicialCholesky.h:70
Eigen::internal::simplicial_cholesky_grab_input::run
static void run(const InputMatrixType &input, ConstCholMatrixPtr &pmat, CholMatrixType &tmp)
Definition: SimplicialCholesky.h:24
Eigen::SimplicialLLT::factorize
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:395
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: SimplicialCholesky.h:286
Eigen::internal::traits< SimplicialLLT< _MatrixType, _UpLo, _Ordering > >::MatrixType
_MatrixType MatrixType
Definition: SimplicialCholesky.h:282
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::SimplicialCholesky::CholMatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > CholMatrixType
Definition: SimplicialCholesky.h:520
Eigen::internal::traits< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::MatrixType
_MatrixType MatrixType
Definition: SimplicialCholesky.h:296
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Eigen::SimplicialLLT::determinant
Scalar determinant() const
Definition: SimplicialCholesky.h:401
Eigen::SimplicialCholeskyBase::~SimplicialCholeskyBase
~SimplicialCholeskyBase()
Definition: SimplicialCholesky.h:100
Eigen::SparseSolverBase::m_isInitialized
bool m_isInitialized
Definition: SparseSolverBase.h:119


gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:03:08