UmfPackSupport.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-2011 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_UMFPACKSUPPORT_H
11 #define EIGEN_UMFPACKSUPPORT_H
12 
13 // for compatibility with super old version of umfpack,
14 // not sure this is really needed, but this is harmless.
15 #ifndef SuiteSparse_long
16 #ifdef UF_long
17 #define SuiteSparse_long UF_long
18 #else
19 #error neither SuiteSparse_long nor UF_long are defined
20 #endif
21 #endif
22 
23 namespace Eigen {
24 
25 /* TODO extract L, extract U, compute det, etc... */
26 
27 // generic double/complex<double> wrapper functions:
28 
29 
30  // Defaults
31 inline void umfpack_defaults(double control[UMFPACK_CONTROL], double, int)
32 { umfpack_di_defaults(control); }
33 
34 inline void umfpack_defaults(double control[UMFPACK_CONTROL], std::complex<double>, int)
35 { umfpack_zi_defaults(control); }
36 
37 inline void umfpack_defaults(double control[UMFPACK_CONTROL], double, SuiteSparse_long)
38 { umfpack_dl_defaults(control); }
39 
40 inline void umfpack_defaults(double control[UMFPACK_CONTROL], std::complex<double>, SuiteSparse_long)
41 { umfpack_zl_defaults(control); }
42 
43 // Report info
44 inline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], double, int)
45 { umfpack_di_report_info(control, info);}
46 
47 inline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], std::complex<double>, int)
48 { umfpack_zi_report_info(control, info);}
49 
50 inline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], double, SuiteSparse_long)
51 { umfpack_dl_report_info(control, info);}
52 
53 inline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], std::complex<double>, SuiteSparse_long)
54 { umfpack_zl_report_info(control, info);}
55 
56 // Report status
57 inline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, double, int)
58 { umfpack_di_report_status(control, status);}
59 
60 inline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, std::complex<double>, int)
61 { umfpack_zi_report_status(control, status);}
62 
63 inline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, double, SuiteSparse_long)
64 { umfpack_dl_report_status(control, status);}
65 
66 inline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, std::complex<double>, SuiteSparse_long)
67 { umfpack_zl_report_status(control, status);}
68 
69 // report control
70 inline void umfpack_report_control(double control[UMFPACK_CONTROL], double, int)
71 { umfpack_di_report_control(control);}
72 
73 inline void umfpack_report_control(double control[UMFPACK_CONTROL], std::complex<double>, int)
74 { umfpack_zi_report_control(control);}
75 
76 inline void umfpack_report_control(double control[UMFPACK_CONTROL], double, SuiteSparse_long)
77 { umfpack_dl_report_control(control);}
78 
79 inline void umfpack_report_control(double control[UMFPACK_CONTROL], std::complex<double>, SuiteSparse_long)
80 { umfpack_zl_report_control(control);}
81 
82 // Free numeric
83 inline void umfpack_free_numeric(void **Numeric, double, int)
84 { umfpack_di_free_numeric(Numeric); *Numeric = 0; }
85 
86 inline void umfpack_free_numeric(void **Numeric, std::complex<double>, int)
87 { umfpack_zi_free_numeric(Numeric); *Numeric = 0; }
88 
89 inline void umfpack_free_numeric(void **Numeric, double, SuiteSparse_long)
90 { umfpack_dl_free_numeric(Numeric); *Numeric = 0; }
91 
92 inline void umfpack_free_numeric(void **Numeric, std::complex<double>, SuiteSparse_long)
93 { umfpack_zl_free_numeric(Numeric); *Numeric = 0; }
94 
95 // Free symbolic
96 inline void umfpack_free_symbolic(void **Symbolic, double, int)
97 { umfpack_di_free_symbolic(Symbolic); *Symbolic = 0; }
98 
99 inline void umfpack_free_symbolic(void **Symbolic, std::complex<double>, int)
100 { umfpack_zi_free_symbolic(Symbolic); *Symbolic = 0; }
101 
102 inline void umfpack_free_symbolic(void **Symbolic, double, SuiteSparse_long)
103 { umfpack_dl_free_symbolic(Symbolic); *Symbolic = 0; }
104 
105 inline void umfpack_free_symbolic(void **Symbolic, std::complex<double>, SuiteSparse_long)
106 { umfpack_zl_free_symbolic(Symbolic); *Symbolic = 0; }
107 
108 // Symbolic
109 inline int umfpack_symbolic(int n_row,int n_col,
110  const int Ap[], const int Ai[], const double Ax[], void **Symbolic,
111  const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
112 {
113  return umfpack_di_symbolic(n_row,n_col,Ap,Ai,Ax,Symbolic,Control,Info);
114 }
115 
116 inline int umfpack_symbolic(int n_row,int n_col,
117  const int Ap[], const int Ai[], const std::complex<double> Ax[], void **Symbolic,
118  const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
119 {
120  return umfpack_zi_symbolic(n_row,n_col,Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Control,Info);
121 }
123  const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const double Ax[], void **Symbolic,
124  const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
125 {
126  return umfpack_dl_symbolic(n_row,n_col,Ap,Ai,Ax,Symbolic,Control,Info);
127 }
128 
130  const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const std::complex<double> Ax[], void **Symbolic,
131  const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
132 {
133  return umfpack_zl_symbolic(n_row,n_col,Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Control,Info);
134 }
135 
136 // Numeric
137 inline int umfpack_numeric( const int Ap[], const int Ai[], const double Ax[],
138  void *Symbolic, void **Numeric,
139  const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])
140 {
141  return umfpack_di_numeric(Ap,Ai,Ax,Symbolic,Numeric,Control,Info);
142 }
143 
144 inline int umfpack_numeric( const int Ap[], const int Ai[], const std::complex<double> Ax[],
145  void *Symbolic, void **Numeric,
146  const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])
147 {
148  return umfpack_zi_numeric(Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Numeric,Control,Info);
149 }
150 inline SuiteSparse_long umfpack_numeric(const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const double Ax[],
151  void *Symbolic, void **Numeric,
152  const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])
153 {
154  return umfpack_dl_numeric(Ap,Ai,Ax,Symbolic,Numeric,Control,Info);
155 }
156 
157 inline SuiteSparse_long umfpack_numeric(const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const std::complex<double> Ax[],
158  void *Symbolic, void **Numeric,
159  const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])
160 {
161  return umfpack_zl_numeric(Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Numeric,Control,Info);
162 }
163 
164 // solve
165 inline int umfpack_solve( int sys, const int Ap[], const int Ai[], const double Ax[],
166  double X[], const double B[], void *Numeric,
167  const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
168 {
169  return umfpack_di_solve(sys,Ap,Ai,Ax,X,B,Numeric,Control,Info);
170 }
171 
172 inline int umfpack_solve( int sys, const int Ap[], const int Ai[], const std::complex<double> Ax[],
173  std::complex<double> X[], const std::complex<double> B[], void *Numeric,
174  const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
175 {
176  return umfpack_zi_solve(sys,Ap,Ai,&numext::real_ref(Ax[0]),0,&numext::real_ref(X[0]),0,&numext::real_ref(B[0]),0,Numeric,Control,Info);
177 }
178 
179 inline SuiteSparse_long umfpack_solve(int sys, const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const double Ax[],
180  double X[], const double B[], void *Numeric,
181  const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
182 {
183  return umfpack_dl_solve(sys,Ap,Ai,Ax,X,B,Numeric,Control,Info);
184 }
185 
186 inline SuiteSparse_long umfpack_solve(int sys, const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const std::complex<double> Ax[],
187  std::complex<double> X[], const std::complex<double> B[], void *Numeric,
188  const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
189 {
190  return umfpack_zl_solve(sys,Ap,Ai,&numext::real_ref(Ax[0]),0,&numext::real_ref(X[0]),0,&numext::real_ref(B[0]),0,Numeric,Control,Info);
191 }
192 
193 // Get Lunz
194 inline int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, double)
195 {
196  return umfpack_di_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);
197 }
198 
199 inline int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, std::complex<double>)
200 {
201  return umfpack_zi_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);
202 }
203 
205  SuiteSparse_long *nz_udiag, void *Numeric, double)
206 {
207  return umfpack_dl_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);
208 }
209 
211  SuiteSparse_long *nz_udiag, void *Numeric, std::complex<double>)
212 {
213  return umfpack_zl_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);
214 }
215 
216 // Get Numeric
217 inline int umfpack_get_numeric(int Lp[], int Lj[], double Lx[], int Up[], int Ui[], double Ux[],
218  int P[], int Q[], double Dx[], int *do_recip, double Rs[], void *Numeric)
219 {
220  return umfpack_di_get_numeric(Lp,Lj,Lx,Up,Ui,Ux,P,Q,Dx,do_recip,Rs,Numeric);
221 }
222 
223 inline int umfpack_get_numeric(int Lp[], int Lj[], std::complex<double> Lx[], int Up[], int Ui[], std::complex<double> Ux[],
224  int P[], int Q[], std::complex<double> Dx[], int *do_recip, double Rs[], void *Numeric)
225 {
226  double& lx0_real = numext::real_ref(Lx[0]);
227  double& ux0_real = numext::real_ref(Ux[0]);
228  double& dx0_real = numext::real_ref(Dx[0]);
229  return umfpack_zi_get_numeric(Lp,Lj,Lx?&lx0_real:0,0,Up,Ui,Ux?&ux0_real:0,0,P,Q,
230  Dx?&dx0_real:0,0,do_recip,Rs,Numeric);
231 }
233  SuiteSparse_long P[], SuiteSparse_long Q[], double Dx[], SuiteSparse_long *do_recip, double Rs[], void *Numeric)
234 {
235  return umfpack_dl_get_numeric(Lp,Lj,Lx,Up,Ui,Ux,P,Q,Dx,do_recip,Rs,Numeric);
236 }
237 
238 inline SuiteSparse_long umfpack_get_numeric(SuiteSparse_long Lp[], SuiteSparse_long Lj[], std::complex<double> Lx[], SuiteSparse_long Up[], SuiteSparse_long Ui[], std::complex<double> Ux[],
239  SuiteSparse_long P[], SuiteSparse_long Q[], std::complex<double> Dx[], SuiteSparse_long *do_recip, double Rs[], void *Numeric)
240 {
241  double& lx0_real = numext::real_ref(Lx[0]);
242  double& ux0_real = numext::real_ref(Ux[0]);
243  double& dx0_real = numext::real_ref(Dx[0]);
244  return umfpack_zl_get_numeric(Lp,Lj,Lx?&lx0_real:0,0,Up,Ui,Ux?&ux0_real:0,0,P,Q,
245  Dx?&dx0_real:0,0,do_recip,Rs,Numeric);
246 }
247 
248 // Get Determinant
249 inline int umfpack_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], int)
250 {
251  return umfpack_di_get_determinant(Mx,Ex,NumericHandle,User_Info);
252 }
253 
254 inline int umfpack_get_determinant(std::complex<double> *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], int)
255 {
256  double& mx_real = numext::real_ref(*Mx);
257  return umfpack_zi_get_determinant(&mx_real,0,Ex,NumericHandle,User_Info);
258 }
259 
260 inline SuiteSparse_long umfpack_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], SuiteSparse_long)
261 {
262  return umfpack_dl_get_determinant(Mx,Ex,NumericHandle,User_Info);
263 }
264 
265 inline SuiteSparse_long umfpack_get_determinant(std::complex<double> *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], SuiteSparse_long)
266 {
267  double& mx_real = numext::real_ref(*Mx);
268  return umfpack_zl_get_determinant(&mx_real,0,Ex,NumericHandle,User_Info);
269 }
270 
271 
287 template<typename _MatrixType>
288 class UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >
289 {
290  protected:
292  using Base::m_isInitialized;
293  public:
294  using Base::_solve_impl;
295  typedef _MatrixType MatrixType;
296  typedef typename MatrixType::Scalar Scalar;
298  typedef typename MatrixType::StorageIndex StorageIndex;
305  enum {
306  ColsAtCompileTime = MatrixType::ColsAtCompileTime,
307  MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
308  };
309 
310  public:
311 
314 
316  : m_dummy(0,0), mp_matrix(m_dummy)
317  {
318  init();
319  }
320 
321  template<typename InputMatrixType>
322  explicit UmfPackLU(const InputMatrixType& matrix)
323  : mp_matrix(matrix)
324  {
325  init();
326  compute(matrix);
327  }
328 
330  {
333  }
334 
335  inline Index rows() const { return mp_matrix.rows(); }
336  inline Index cols() const { return mp_matrix.cols(); }
337 
344  {
345  eigen_assert(m_isInitialized && "Decomposition is not initialized.");
346  return m_info;
347  }
348 
349  inline const LUMatrixType& matrixL() const
350  {
352  return m_l;
353  }
354 
355  inline const LUMatrixType& matrixU() const
356  {
358  return m_u;
359  }
360 
361  inline const IntColVectorType& permutationP() const
362  {
364  return m_p;
365  }
366 
367  inline const IntRowVectorType& permutationQ() const
368  {
370  return m_q;
371  }
372 
377  template<typename InputMatrixType>
378  void compute(const InputMatrixType& matrix)
379  {
382  grab(matrix.derived());
384  factorize_impl();
385  }
386 
393  template<typename InputMatrixType>
394  void analyzePattern(const InputMatrixType& matrix)
395  {
398 
399  grab(matrix.derived());
400 
402  }
403 
409  inline int umfpackFactorizeReturncode() const
410  {
411  eigen_assert(m_numeric && "UmfPackLU: you must first call factorize()");
412  return m_fact_errorCode;
413  }
414 
421  inline const UmfpackControl& umfpackControl() const
422  {
423  return m_control;
424  }
425 
433  {
434  return m_control;
435  }
436 
443  template<typename InputMatrixType>
444  void factorize(const InputMatrixType& matrix)
445  {
446  eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()");
447  if(m_numeric)
449 
450  grab(matrix.derived());
451 
452  factorize_impl();
453  }
454 
460  {
462  }
463 
469  {
470  eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()");
472  }
473 
479  eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()");
481  }
482 
484  template<typename BDerived,typename XDerived>
486 
487  Scalar determinant() const;
488 
489  void extractData() const;
490 
491  protected:
492 
493  void init()
494  {
496  m_isInitialized = false;
497  m_numeric = 0;
498  m_symbolic = 0;
500 
502  }
503 
505  {
506  m_fact_errorCode = umfpack_symbolic(internal::convert_index<StorageIndex>(mp_matrix.rows()),
507  internal::convert_index<StorageIndex>(mp_matrix.cols()),
508  mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(),
510 
511  m_isInitialized = true;
513  m_analysisIsOk = true;
514  m_factorizationIsOk = false;
516  }
517 
519  {
520 
521  m_fact_errorCode = umfpack_numeric(mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(),
523 
524  m_info = m_fact_errorCode == UMFPACK_OK ? Success : NumericalIssue;
525  m_factorizationIsOk = true;
527  }
528 
529  template<typename MatrixDerived>
531  {
532  mp_matrix.~UmfpackMatrixRef();
533  ::new (&mp_matrix) UmfpackMatrixRef(A.derived());
534  }
535 
536  void grab(const UmfpackMatrixRef &A)
537  {
538  if(&(A.derived()) != &mp_matrix)
539  {
540  mp_matrix.~UmfpackMatrixRef();
541  ::new (&mp_matrix) UmfpackMatrixRef(A);
542  }
543  }
544 
545  // cached data to reduce reallocation, etc.
546  mutable LUMatrixType m_l;
550 
551  mutable LUMatrixType m_u;
554 
557 
558  void* m_numeric;
559  void* m_symbolic;
560 
565 
566  private:
567  UmfPackLU(const UmfPackLU& ) { }
568 };
569 
570 
571 template<typename MatrixType>
573 {
574  if (m_extractedDataAreDirty)
575  {
576  // get size of the data
577  StorageIndex lnz, unz, rows, cols, nz_udiag;
578  umfpack_get_lunz(&lnz, &unz, &rows, &cols, &nz_udiag, m_numeric, Scalar());
579 
580  // allocate data
581  m_l.resize(rows,(std::min)(rows,cols));
582  m_l.resizeNonZeros(lnz);
583 
584  m_u.resize((std::min)(rows,cols),cols);
585  m_u.resizeNonZeros(unz);
586 
587  m_p.resize(rows);
588  m_q.resize(cols);
589 
590  // extract
591  umfpack_get_numeric(m_l.outerIndexPtr(), m_l.innerIndexPtr(), m_l.valuePtr(),
592  m_u.outerIndexPtr(), m_u.innerIndexPtr(), m_u.valuePtr(),
593  m_p.data(), m_q.data(), 0, 0, 0, m_numeric);
594 
595  m_extractedDataAreDirty = false;
596  }
597 }
598 
599 template<typename MatrixType>
601 {
602  Scalar det;
603  umfpack_get_determinant(&det, 0, m_numeric, 0, StorageIndex());
604  return det;
605 }
606 
607 template<typename MatrixType>
608 template<typename BDerived,typename XDerived>
610 {
611  Index rhsCols = b.cols();
612  eigen_assert((BDerived::Flags&RowMajorBit)==0 && "UmfPackLU backend does not support non col-major rhs yet");
613  eigen_assert((XDerived::Flags&RowMajorBit)==0 && "UmfPackLU backend does not support non col-major result yet");
614  eigen_assert(b.derived().data() != x.derived().data() && " Umfpack does not support inplace solve");
615 
616  Scalar* x_ptr = 0;
618  if(x.innerStride()!=1)
619  {
620  x_tmp.resize(x.rows());
621  x_ptr = x_tmp.data();
622  }
623  for (int j=0; j<rhsCols; ++j)
624  {
625  if(x.innerStride()==1)
626  x_ptr = &x.col(j).coeffRef(0);
627  StorageIndex errorCode = umfpack_solve(UMFPACK_A,
628  mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(),
629  x_ptr, &b.const_cast_derived().col(j).coeffRef(0),
630  m_numeric, m_control.data(), m_umfpackInfo.data());
631  if(x.innerStride()!=1)
632  x.col(j) = x_tmp;
633  if (errorCode!=0)
634  return false;
635  }
636 
637  return true;
638 }
639 
640 } // end namespace Eigen
641 
642 #endif // EIGEN_UMFPACKSUPPORT_H
Eigen::umfpack_get_numeric
int umfpack_get_numeric(int Lp[], int Lj[], double Lx[], int Up[], int Ui[], double Ux[], int P[], int Q[], double Dx[], int *do_recip, double Rs[], void *Numeric)
Definition: UmfPackSupport.h:217
Eigen::NumericalIssue
@ NumericalIssue
Definition: Constants.h:444
Eigen::UmfPackLU::UmfpackControl
Array< double, UMFPACK_CONTROL, 1 > UmfpackControl
Definition: UmfPackSupport.h:312
Eigen::umfpack_report_status
void umfpack_report_status(double control[UMFPACK_CONTROL], int status, double, int)
Definition: UmfPackSupport.h:57
Eigen::UmfPackLU::m_analysisIsOk
int m_analysisIsOk
Definition: UmfPackSupport.h:563
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::UmfPackLU::m_l
LUMatrixType m_l
Definition: UmfPackSupport.h:546
Eigen::SparseMatrix< Scalar >
Eigen::UmfPackLU::factorize_impl
void factorize_impl()
Definition: UmfPackSupport.h:518
Eigen::UmfPackLU::matrixU
const LUMatrixType & matrixU() const
Definition: UmfPackSupport.h:355
Eigen::umfpack_free_numeric
void umfpack_free_numeric(void **Numeric, double, int)
Definition: UmfPackSupport.h:83
Eigen::UmfPackLU::m_u
LUMatrixType m_u
Definition: UmfPackSupport.h:551
Eigen::UmfPackLU::m_control
UmfpackControl m_control
Definition: UmfPackSupport.h:548
Eigen::SparseSolverBase< UmfPackLU< _MatrixType > >::_solve_impl
void _solve_impl(const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
Definition: SparseSolverBase.h:111
Eigen::UmfPackLU::umfpackControl
const UmfpackControl & umfpackControl() const
Definition: UmfPackSupport.h:421
Eigen::UmfPackLU::MatrixType
_MatrixType MatrixType
Definition: UmfPackSupport.h:295
b
Scalar * b
Definition: benchVecAdd.cpp:17
Eigen::EigenBase
Definition: EigenBase.h:29
Eigen::umfpack_solve
int umfpack_solve(int sys, const int Ap[], const int Ai[], const double Ax[], double X[], const double B[], void *Numeric, const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
Definition: UmfPackSupport.h:165
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::UmfPackLU::m_q
IntRowVectorType m_q
Definition: UmfPackSupport.h:553
x
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 x
Definition: gnuplot_common_settings.hh:12
Eigen::UmfPackLU::m_extractedDataAreDirty
bool m_extractedDataAreDirty
Definition: UmfPackSupport.h:564
Eigen::RowMajorBit
const unsigned int RowMajorBit
Definition: Constants.h:66
B
Definition: test_numpy_dtypes.cpp:299
Eigen::UmfPackLU::matrixL
const LUMatrixType & matrixL() const
Definition: UmfPackSupport.h:349
Eigen::UmfPackLU::UmfpackInfo
Array< double, UMFPACK_INFO, 1 > UmfpackInfo
Definition: UmfPackSupport.h:313
Eigen::Success
@ Success
Definition: Constants.h:442
Eigen::Array< double, UMFPACK_CONTROL, 1 >
Eigen::UmfPackLU::Scalar
MatrixType::Scalar Scalar
Definition: UmfPackSupport.h:296
X
#define X
Definition: icosphere.cpp:20
Eigen::UmfPackLU::rows
Index rows() const
Definition: UmfPackSupport.h:335
Eigen::umfpack_free_symbolic
void umfpack_free_symbolic(void **Symbolic, double, int)
Definition: UmfPackSupport.h:96
Eigen::UmfPackLU::m_numeric
void * m_numeric
Definition: UmfPackSupport.h:558
Eigen::umfpack_report_info
void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], double, int)
Definition: UmfPackSupport.h:44
Eigen::UmfPackLU::mp_matrix
UmfpackMatrixRef mp_matrix
Definition: UmfPackSupport.h:556
Eigen::PlainObjectBase::resize
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition: PlainObjectBase.h:271
Eigen::UmfPackLU::Base
SparseSolverBase< UmfPackLU< _MatrixType > > Base
Definition: UmfPackSupport.h:291
Eigen::UmfPackLU::analyzePattern_impl
void analyzePattern_impl()
Definition: UmfPackSupport.h:504
Eigen::UmfPackLU::UmfPackLU
UmfPackLU()
Definition: UmfPackSupport.h:315
Eigen::UmfPackLU::info
ComputationInfo info() const
Reports whether previous computation was successful.
Definition: UmfPackSupport.h:343
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::UmfPackLU::umfpackControl
UmfpackControl & umfpackControl()
Definition: UmfPackSupport.h:432
Eigen::umfpack_get_lunz
int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, double)
Definition: UmfPackSupport.h:194
Eigen::umfpack_symbolic
int umfpack_symbolic(int n_row, int n_col, const int Ap[], const int Ai[], const double Ax[], void **Symbolic, const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
Definition: UmfPackSupport.h:109
A
Definition: test_numpy_dtypes.cpp:298
Eigen::UmfPackLU::RealScalar
MatrixType::RealScalar RealScalar
Definition: UmfPackSupport.h:297
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
Eigen::UmfPackLU::m_info
ComputationInfo m_info
Definition: UmfPackSupport.h:561
Eigen::UmfPackLU::permutationQ
const IntRowVectorType & permutationQ() const
Definition: UmfPackSupport.h:367
Eigen::numext::real_ref
EIGEN_DEVICE_FUNC internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar &x)
Definition: Eigen/src/Core/MathFunctions.h:1239
Eigen::UmfPackLU::permutationP
const IntColVectorType & permutationP() const
Definition: UmfPackSupport.h:361
Eigen::UmfPackLU::m_fact_errorCode
StorageIndex m_fact_errorCode
Definition: UmfPackSupport.h:547
Eigen::UmfPackLU::IntRowVectorType
Matrix< int, 1, MatrixType::ColsAtCompileTime > IntRowVectorType
Definition: UmfPackSupport.h:300
Eigen::umfpack_defaults
void umfpack_defaults(double control[UMFPACK_CONTROL], double, int)
Definition: UmfPackSupport.h:31
Eigen::UmfPackLU::compute
void compute(const InputMatrixType &matrix)
Definition: UmfPackSupport.h:378
Eigen::UmfPackLU::UmfpackMatrixRef
Ref< const UmfpackMatrixType, StandardCompressedFormat > UmfpackMatrixRef
Definition: UmfPackSupport.h:304
info
else if n * info
Definition: 3rdparty/Eigen/lapack/cholesky.cpp:18
Eigen::UmfPackLU::IntColVectorType
Matrix< int, MatrixType::RowsAtCompileTime, 1 > IntColVectorType
Definition: UmfPackSupport.h:301
Eigen::UmfPackLU::determinant
Scalar determinant() const
Definition: UmfPackSupport.h:600
Eigen::UmfPackLU::UmfpackMatrixType
SparseMatrix< Scalar, ColMajor, StorageIndex > UmfpackMatrixType
Definition: UmfPackSupport.h:303
Eigen::umfpack_numeric
int umfpack_numeric(const int Ap[], const int Ai[], const double Ax[], void *Symbolic, void **Numeric, const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])
Definition: UmfPackSupport.h:137
Eigen::UmfPackLU::printUmfpackInfo
void printUmfpackInfo()
Definition: UmfPackSupport.h:468
Eigen::UmfPackLU::m_dummy
UmfpackMatrixType m_dummy
Definition: UmfPackSupport.h:555
SuiteSparse_long
#define SuiteSparse_long
Definition: SuiteSparse_config.h:62
Eigen::UmfPackLU::printUmfpackStatus
void printUmfpackStatus()
Definition: UmfPackSupport.h:478
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::UmfPackLU::~UmfPackLU
~UmfPackLU()
Definition: UmfPackSupport.h:329
Eigen::UmfPackLU
A sparse LU factorization and solver based on UmfPack.
Definition: UmfPackSupport.h:288
RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:47
Eigen::UmfPackLU::ColsAtCompileTime
@ ColsAtCompileTime
Definition: UmfPackSupport.h:306
Eigen::UmfPackLU::m_p
IntColVectorType m_p
Definition: UmfPackSupport.h:552
Eigen::Quaternion
The quaternion class used to represent 3D orientations and rotations.
Definition: ForwardDeclarations.h:293
Eigen::UmfPackLU::printUmfpackControl
void printUmfpackControl()
Definition: UmfPackSupport.h:459
Eigen::SparseSolverBase
A base class for sparse solvers.
Definition: SparseSolverBase.h:67
Eigen::UmfPackLU::analyzePattern
void analyzePattern(const InputMatrixType &matrix)
Definition: UmfPackSupport.h:394
Eigen::Ref< const UmfpackMatrixType, StandardCompressedFormat >
Eigen::UmfPackLU::extractData
void extractData() const
Definition: UmfPackSupport.h:572
Eigen::UmfPackLU::MaxColsAtCompileTime
@ MaxColsAtCompileTime
Definition: UmfPackSupport.h:307
Eigen::UmfPackLU::m_umfpackInfo
UmfpackInfo m_umfpackInfo
Definition: UmfPackSupport.h:549
Eigen::UmfPackLU::m_symbolic
void * m_symbolic
Definition: UmfPackSupport.h:559
Eigen::UmfPackLU::Vector
Matrix< Scalar, Dynamic, 1 > Vector
Definition: UmfPackSupport.h:299
Eigen::UmfPackLU::grab
void grab(const EigenBase< MatrixDerived > &A)
Definition: UmfPackSupport.h:530
Eigen::UmfPackLU::init
void init()
Definition: UmfPackSupport.h:493
P
static double P[]
Definition: ellpe.c:68
Eigen::PlainObjectBase::data
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
Definition: PlainObjectBase.h:247
Eigen::umfpack_report_control
void umfpack_report_control(double control[UMFPACK_CONTROL], double, int)
Definition: UmfPackSupport.h:70
min
#define min(a, b)
Definition: datatypes.h:19
Eigen::UmfPackLU::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: UmfPackSupport.h:298
Eigen::UmfPackLU::factorize
void factorize(const InputMatrixType &matrix)
Definition: UmfPackSupport.h:444
Eigen::Matrix< Scalar, Dynamic, 1 >
Eigen::InvalidInput
@ InvalidInput
Definition: Constants.h:449
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Eigen::UmfPackLU::umfpackFactorizeReturncode
int umfpackFactorizeReturncode() const
Definition: UmfPackSupport.h:409
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
Eigen::ComputationInfo
ComputationInfo
Definition: Constants.h:440
Eigen::UmfPackLU::cols
Index cols() const
Definition: UmfPackSupport.h:336
Eigen::UmfPackLU::grab
void grab(const UmfpackMatrixRef &A)
Definition: UmfPackSupport.h:536
Eigen::UmfPackLU::m_factorizationIsOk
int m_factorizationIsOk
Definition: UmfPackSupport.h:562
Eigen::UmfPackLU::LUMatrixType
SparseMatrix< Scalar > LUMatrixType
Definition: UmfPackSupport.h:302
Eigen::UmfPackLU::UmfPackLU
UmfPackLU(const UmfPackLU &)
Definition: UmfPackSupport.h:567
Eigen::UmfPackLU::_solve_impl
bool _solve_impl(const MatrixBase< BDerived > &b, MatrixBase< XDerived > &x) const
Definition: UmfPackSupport.h:609
Eigen::UmfPackLU::UmfPackLU
UmfPackLU(const InputMatrixType &matrix)
Definition: UmfPackSupport.h:322
Eigen::umfpack_get_determinant
int umfpack_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info[UMFPACK_INFO], int)
Definition: UmfPackSupport.h:249
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Eigen::SparseSolverBase< UmfPackLU< _MatrixType > >::m_isInitialized
bool m_isInitialized
Definition: SparseSolverBase.h:119


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:04