10#ifndef EIGEN_SUPERLUSUPPORT_H
11#define EIGEN_SUPERLUSUPPORT_H
14#include "./InternalHeaderCheck.h"
18#if defined(SUPERLU_MAJOR_VERSION) && (SUPERLU_MAJOR_VERSION >= 5)
19#define DECL_GSSVX(PREFIX, FLOATTYPE, KEYTYPE) \
21 extern void PREFIX##gssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, FLOATTYPE *, FLOATTYPE *, \
22 SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, FLOATTYPE *, \
23 FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, \
26 inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r, int *etree, \
27 char *equed, FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, SuperMatrix *U, void *work, \
28 int lwork, SuperMatrix *B, SuperMatrix *X, FLOATTYPE *recip_pivot_growth, \
29 FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr, SuperLUStat_t *stats, int *info, \
31 mem_usage_t mem_usage; \
33 PREFIX##gssvx(options, A, perm_c, perm_r, etree, equed, R, C, L, U, work, lwork, B, X, recip_pivot_growth, rcond, \
34 ferr, berr, &gLU, &mem_usage, stats, info); \
35 return mem_usage.for_lu; \
38#define DECL_GSSVX(PREFIX, FLOATTYPE, KEYTYPE) \
40 extern void PREFIX##gssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, FLOATTYPE *, FLOATTYPE *, \
41 SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, FLOATTYPE *, \
42 FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, mem_usage_t *, SuperLUStat_t *, int *); \
44 inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r, int *etree, \
45 char *equed, FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, SuperMatrix *U, void *work, \
46 int lwork, SuperMatrix *B, SuperMatrix *X, FLOATTYPE *recip_pivot_growth, \
47 FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr, SuperLUStat_t *stats, int *info, \
49 mem_usage_t mem_usage; \
50 PREFIX##gssvx(options, A, perm_c, perm_r, etree, equed, R, C, L, U, work, lwork, B, X, recip_pivot_growth, rcond, \
51 ferr, berr, &mem_usage, stats, info); \
52 return mem_usage.for_lu; \
56DECL_GSSVX(s,
float,
float)
57DECL_GSSVX(c,
float, std::complex<float>)
58DECL_GSSVX(d,
double,
double)
59DECL_GSSVX(z,
double, std::complex<double>)
62#define EIGEN_SUPERLU_HAS_ILU
65#ifdef EIGEN_SUPERLU_HAS_ILU
68#define DECL_GSISX(PREFIX, FLOATTYPE, KEYTYPE) \
70 extern void PREFIX##gsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, FLOATTYPE *, FLOATTYPE *, \
71 SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, FLOATTYPE *, \
72 FLOATTYPE *, mem_usage_t *, SuperLUStat_t *, int *); \
74 inline float SuperLU_gsisx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r, int *etree, \
75 char *equed, FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, SuperMatrix *U, void *work, \
76 int lwork, SuperMatrix *B, SuperMatrix *X, FLOATTYPE *recip_pivot_growth, \
77 FLOATTYPE *rcond, SuperLUStat_t *stats, int *info, KEYTYPE) { \
78 mem_usage_t mem_usage; \
79 PREFIX##gsisx(options, A, perm_c, perm_r, etree, equed, R, C, L, U, work, lwork, B, X, recip_pivot_growth, rcond, \
80 &mem_usage, stats, info); \
81 return mem_usage.for_lu; \
84DECL_GSISX(s,
float,
float)
85DECL_GSISX(c,
float, std::complex<float>)
86DECL_GSISX(d,
double,
double)
87DECL_GSISX(z,
double, std::complex<double>)
91template <
typename MatrixType>
92struct SluMatrixMapHelper;
101struct SluMatrix : SuperMatrix {
102 SluMatrix() { Store = &storage; }
104 SluMatrix(
const SluMatrix &other) : SuperMatrix(other) {
106 storage = other.storage;
109 SluMatrix &operator=(
const SluMatrix &other) {
110 SuperMatrix::operator=(
static_cast<const SuperMatrix &
>(other));
112 storage = other.storage;
126 void setStorageType(Stype_t t) {
128 if (t == SLU_NC || t == SLU_NR || t == SLU_DN)
131 eigen_assert(
false &&
"storage type not supported");
136 template <
typename Scalar>
137 void setScalarType() {
138 if (internal::is_same<Scalar, float>::value)
140 else if (internal::is_same<Scalar, double>::value)
142 else if (internal::is_same<Scalar, std::complex<float> >::value)
144 else if (internal::is_same<Scalar, std::complex<double> >::value)
147 eigen_assert(
false &&
"Scalar type not supported by SuperLU");
151 template <
typename MatrixType>
152 static SluMatrix Map(MatrixBase<MatrixType> &_mat) {
153 MatrixType &mat(_mat.derived());
155 "row-major dense matrices are not supported by SuperLU");
157 res.setStorageType(SLU_DN);
158 res.setScalarType<
typename MatrixType::Scalar>();
161 res.nrow = internal::convert_index<int>(mat.rows());
162 res.ncol = internal::convert_index<int>(mat.cols());
164 res.storage.lda = internal::convert_index<int>(MatrixType::IsVectorAtCompileTime ? mat.size() : mat.outerStride());
165 res.storage.values = (
void *)(mat.data());
169 template <
typename MatrixType>
170 static SluMatrix Map(SparseMatrixBase<MatrixType> &a_mat) {
171 MatrixType &mat(a_mat.derived());
174 res.setStorageType(SLU_NR);
175 res.nrow = internal::convert_index<int>(mat.cols());
176 res.ncol = internal::convert_index<int>(mat.rows());
178 res.setStorageType(SLU_NC);
179 res.nrow = internal::convert_index<int>(mat.rows());
180 res.ncol = internal::convert_index<int>(mat.cols());
185 res.storage.nnz = internal::convert_index<int>(mat.nonZeros());
186 res.storage.values = mat.valuePtr();
187 res.storage.innerInd = mat.innerIndexPtr();
188 res.storage.outerInd = mat.outerIndexPtr();
190 res.setScalarType<
typename MatrixType::Scalar>();
193 if (
int(MatrixType::Flags) & int(
Upper)) res.Mtype = SLU_TRU;
194 if (
int(MatrixType::Flags) &
int(
Lower)) res.Mtype = SLU_TRL;
196 eigen_assert(((
int(MatrixType::Flags) &
int(
SelfAdjoint)) == 0) &&
197 "SelfAdjoint matrix shape not supported by SuperLU");
203template <
typename Scalar,
int Rows,
int Cols,
int Options,
int MRows,
int MCols>
204struct SluMatrixMapHelper<Matrix<Scalar, Rows, Cols, Options, MRows, MCols> > {
205 typedef Matrix<Scalar, Rows, Cols, Options, MRows, MCols> MatrixType;
206 static void run(MatrixType &mat, SluMatrix &res) {
207 eigen_assert(((Options &
RowMajor) !=
RowMajor) &&
"row-major dense matrices is not supported by SuperLU");
208 res.setStorageType(SLU_DN);
209 res.setScalarType<Scalar>();
212 res.nrow = mat.rows();
213 res.ncol = mat.cols();
215 res.storage.lda = mat.outerStride();
216 res.storage.values = mat.data();
220template <
typename Derived>
221struct SluMatrixMapHelper<SparseMatrixBase<Derived> > {
222 typedef Derived MatrixType;
223 static void run(MatrixType &mat, SluMatrix &res) {
225 res.setStorageType(SLU_NR);
226 res.nrow = mat.cols();
227 res.ncol = mat.rows();
229 res.setStorageType(SLU_NC);
230 res.nrow = mat.rows();
231 res.ncol = mat.cols();
236 res.storage.nnz = mat.nonZeros();
237 res.storage.values = mat.valuePtr();
238 res.storage.innerInd = mat.innerIndexPtr();
239 res.storage.outerInd = mat.outerIndexPtr();
241 res.setScalarType<
typename MatrixType::Scalar>();
244 if (MatrixType::Flags &
Upper) res.Mtype = SLU_TRU;
245 if (MatrixType::Flags &
Lower) res.Mtype = SLU_TRL;
247 eigen_assert(((MatrixType::Flags &
SelfAdjoint) == 0) &&
"SelfAdjoint matrix shape not supported by SuperLU");
253template <
typename MatrixType>
254SluMatrix asSluMatrix(MatrixType &mat) {
255 return SluMatrix::Map(mat);
259template <
typename Scalar,
int Flags,
typename Index>
260Map<SparseMatrix<Scalar, Flags, Index> > map_superlu(SluMatrix &sluMat) {
264 Index outerSize = (Flags &
RowMajor) ==
RowMajor ? sluMat.ncol : sluMat.nrow;
266 return Map<SparseMatrix<Scalar, Flags, Index> >(sluMat.nrow, sluMat.ncol, sluMat.storage.outerInd[outerSize],
267 sluMat.storage.outerInd, sluMat.storage.innerInd,
268 reinterpret_cast<Scalar *
>(sluMat.storage.values));
277template <
typename MatrixType_,
typename Derived>
282 using Base::m_isInitialized;
285 typedef MatrixType_ MatrixType;
286 typedef typename MatrixType::Scalar Scalar;
287 typedef typename MatrixType::RealScalar RealScalar;
288 typedef typename MatrixType::StorageIndex StorageIndex;
294 enum { ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime };
301 inline Index rows()
const {
return m_matrix.
rows(); }
302 inline Index cols()
const {
return m_matrix.
cols(); }
305 inline superlu_options_t &
options() {
return m_sluOptions; }
313 eigen_assert(m_isInitialized &&
"Decomposition is not initialized.");
319 derived().analyzePattern(matrix);
320 derived().factorize(matrix);
330 m_isInitialized =
true;
332 m_analysisIsOk =
true;
333 m_factorizationIsOk =
false;
336 template <
typename Stream>
337 void dumpMemory(Stream & ) {}
340 void initFactorization(
const MatrixType &a) {
341 set_default_options(&this->m_sluOptions);
343 const Index size = a.rows();
346 m_sluA = internal::asSluMatrix(m_matrix);
353 m_sluEtree.resize(size);
356 m_sluB.setStorageType(SLU_DN);
357 m_sluB.setScalarType<Scalar>();
358 m_sluB.Mtype = SLU_GE;
359 m_sluB.storage.values = 0;
362 m_sluB.storage.lda = internal::convert_index<int>(size);
365 m_extractedDataAreDirty =
true;
370 m_isInitialized =
false;
375 void extractData()
const;
377 void clearFactors() {
378 if (m_sluL.Store) Destroy_SuperNode_Matrix(&m_sluL);
379 if (m_sluU.Store) Destroy_CompCol_Matrix(&m_sluU);
384 memset(&m_sluL, 0,
sizeof m_sluL);
385 memset(&m_sluU, 0,
sizeof m_sluU);
389 mutable LUMatrixType m_l;
390 mutable LUMatrixType m_u;
391 mutable IntColVectorType m_p;
392 mutable IntRowVectorType m_q;
394 mutable LUMatrixType m_matrix;
395 mutable SluMatrix m_sluA;
396 mutable SuperMatrix m_sluL, m_sluU;
397 mutable SluMatrix m_sluB, m_sluX;
398 mutable SuperLUStat_t m_sluStat;
399 mutable superlu_options_t m_sluOptions;
400 mutable std::vector<int> m_sluEtree;
401 mutable Matrix<RealScalar, Dynamic, 1> m_sluRscale, m_sluCscale;
402 mutable Matrix<RealScalar, Dynamic, 1> m_sluFerr, m_sluBerr;
403 mutable char m_sluEqued;
405 mutable ComputationInfo m_info;
406 int m_factorizationIsOk;
408 mutable bool m_extractedDataAreDirty;
411 SuperLUBase(SuperLUBase &) {}
430template <
typename MatrixType_>
434 typedef MatrixType_ MatrixType;
435 typedef typename Base::Scalar Scalar;
436 typedef typename Base::RealScalar RealScalar;
437 typedef typename Base::StorageIndex StorageIndex;
446 using Base::_solve_impl;
450 explicit SuperLU(
const MatrixType &matrix) :
Base() {
465 m_isInitialized =
false;
475 void factorize(
const MatrixType &matrix);
478 template <
typename Rhs,
typename Dest>
481 inline const LMatrixType &matrixL()
const {
482 if (m_extractedDataAreDirty) this->extractData();
486 inline const UMatrixType &matrixU()
const {
487 if (m_extractedDataAreDirty) this->extractData();
491 inline const IntColVectorType &permutationP()
const {
492 if (m_extractedDataAreDirty) this->extractData();
496 inline const IntRowVectorType &permutationQ()
const {
497 if (m_extractedDataAreDirty) this->extractData();
501 Scalar determinant()
const;
505 using Base::m_matrix;
510 using Base::m_sluBerr;
511 using Base::m_sluCscale;
512 using Base::m_sluEqued;
513 using Base::m_sluEtree;
514 using Base::m_sluFerr;
516 using Base::m_sluOptions;
517 using Base::m_sluRscale;
518 using Base::m_sluStat;
523 using Base::m_analysisIsOk;
524 using Base::m_extractedDataAreDirty;
525 using Base::m_factorizationIsOk;
527 using Base::m_isInitialized;
532 set_default_options(&this->m_sluOptions);
533 m_sluOptions.PrintStat = NO;
534 m_sluOptions.ConditionNumber = NO;
535 m_sluOptions.Trans = NOTRANS;
536 m_sluOptions.ColPerm = COLAMD;
540 SuperLU(SuperLU &) {}
543template <
typename MatrixType>
545 eigen_assert(m_analysisIsOk &&
"You must first call analyzePattern()");
546 if (!m_analysisIsOk) {
551 this->initFactorization(a);
553 m_sluOptions.ColPerm = COLAMD;
555 RealScalar recip_pivot_growth, rcond;
556 RealScalar ferr, berr;
558 StatInit(&m_sluStat);
559 SuperLU_gssvx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0], &m_sluEqued, &m_sluRscale[0],
560 &m_sluCscale[0], &m_sluL, &m_sluU, NULL, 0, &m_sluB, &m_sluX, &recip_pivot_growth, &rcond, &ferr, &berr,
561 &m_sluStat, &info, Scalar());
562 StatFree(&m_sluStat);
564 m_extractedDataAreDirty =
true;
568 m_factorizationIsOk =
true;
571template <
typename MatrixType>
572template <
typename Rhs,
typename Dest>
574 eigen_assert(m_factorizationIsOk &&
575 "The decomposition is not in a valid state for solving, you must first call either compute() or "
576 "analyzePattern()/factorize()");
579 eigen_assert(m_matrix.rows() == b.
rows());
581 m_sluOptions.Trans = NOTRANS;
582 m_sluOptions.Fact = FACTORED;
583 m_sluOptions.IterRefine = NOREFINE;
585 m_sluFerr.resize(rhsCols);
586 m_sluBerr.resize(rhsCols);
591 m_sluB = SluMatrix::Map(b_ref.const_cast_derived());
592 m_sluX = SluMatrix::Map(x_ref.const_cast_derived());
594 typename Rhs::PlainObject b_cpy;
595 if (m_sluEqued !=
'N') {
597 m_sluB = SluMatrix::Map(b_cpy.const_cast_derived());
600 StatInit(&m_sluStat);
602 RealScalar recip_pivot_growth, rcond;
603 SuperLU_gssvx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0], &m_sluEqued, &m_sluRscale[0],
604 &m_sluCscale[0], &m_sluL, &m_sluU, NULL, 0, &m_sluB, &m_sluX, &recip_pivot_growth, &rcond,
605 &m_sluFerr[0], &m_sluBerr[0], &m_sluStat, &info, Scalar());
606 StatFree(&m_sluStat);
608 if (x.
derived().data() != x_ref.data()) x = x_ref;
610 m_info = info == 0 ? Success : NumericalIssue;
620template <
typename MatrixType,
typename Derived>
621void SuperLUBase<MatrixType, Derived>::extractData()
const {
622 eigen_assert(m_factorizationIsOk &&
623 "The decomposition is not in a valid state for extracting factors, you must first call either compute() "
624 "or analyzePattern()/factorize()");
625 if (m_extractedDataAreDirty) {
627 int fsupc, istart, nsupr;
628 int lastl = 0, lastu = 0;
629 SCformat *Lstore =
static_cast<SCformat *
>(m_sluL.Store);
630 NCformat *Ustore =
static_cast<NCformat *
>(m_sluU.Store);
633 const Index size = m_matrix.rows();
634 m_l.resize(size, size);
635 m_l.resizeNonZeros(Lstore->nnz);
636 m_u.resize(size, size);
637 m_u.resizeNonZeros(Ustore->nnz);
639 int *Lcol = m_l.outerIndexPtr();
640 int *Lrow = m_l.innerIndexPtr();
641 Scalar *Lval = m_l.valuePtr();
643 int *Ucol = m_u.outerIndexPtr();
644 int *Urow = m_u.innerIndexPtr();
645 Scalar *Uval = m_u.valuePtr();
651 for (
int k = 0; k <= Lstore->nsuper; ++k) {
652 fsupc = L_FST_SUPC(k);
653 istart = L_SUB_START(fsupc);
654 nsupr = L_SUB_START(fsupc + 1) - istart;
658 for (
int j = fsupc; j < L_FST_SUPC(k + 1); ++j) {
659 SNptr = &((Scalar *)Lstore->nzval)[L_NZ_START(j)];
662 for (
int i = U_NZ_START(j); i < U_NZ_START(j + 1); ++i) {
663 Uval[lastu] = ((Scalar *)Ustore->nzval)[i];
665 if (Uval[lastu] != 0.0) Urow[lastu++] = U_SUB(i);
667 for (
int i = 0; i < upper; ++i) {
669 Uval[lastu] = SNptr[i];
671 if (Uval[lastu] != 0.0) Urow[lastu++] = L_SUB(istart + i);
677 Lrow[lastl++] = L_SUB(istart + upper - 1);
678 for (
int i = upper; i < nsupr; ++i) {
679 Lval[lastl] = SNptr[i];
681 if (Lval[lastl] != 0.0) Lrow[lastl++] = L_SUB(istart + i);
691 m_l.resizeNonZeros(lastl);
692 m_u.resizeNonZeros(lastu);
694 m_extractedDataAreDirty =
false;
698template <
typename MatrixType>
699typename SuperLU<MatrixType>::Scalar SuperLU<MatrixType>::determinant()
const {
700 eigen_assert(m_factorizationIsOk &&
701 "The decomposition is not in a valid state for computing the determinant, you must first call either "
702 "compute() or analyzePattern()/factorize()");
704 if (m_extractedDataAreDirty) this->extractData();
706 Scalar det = Scalar(1);
707 for (
int j = 0; j < m_u.cols(); ++j) {
708 if (m_u.outerIndexPtr()[j + 1] - m_u.outerIndexPtr()[j] > 0) {
709 int lastId = m_u.outerIndexPtr()[j + 1] - 1;
710 eigen_assert(m_u.innerIndexPtr()[lastId] <= j);
711 if (m_u.innerIndexPtr()[lastId] == j) det *= m_u.valuePtr()[lastId];
714 if (PermutationMap(m_p.data(), m_p.size()).determinant() * PermutationMap(m_q.data(), m_q.size()).determinant() < 0)
716 if (m_sluEqued !=
'N')
717 return det / m_sluRscale.prod() / m_sluCscale.prod();
722#ifdef EIGEN_PARSED_BY_DOXYGEN
723#define EIGEN_SUPERLU_HAS_ILU
726#ifdef EIGEN_SUPERLU_HAS_ILU
745template <
typename MatrixType_>
749 typedef MatrixType_ MatrixType;
750 typedef typename Base::Scalar Scalar;
751 typedef typename Base::RealScalar RealScalar;
754 using Base::_solve_impl;
779 void factorize(
const MatrixType &matrix);
781#ifndef EIGEN_PARSED_BY_DOXYGEN
783 template <
typename Rhs,
typename Dest>
789 using Base::m_matrix;
794 using Base::m_sluBerr;
795 using Base::m_sluCscale;
796 using Base::m_sluEqued;
797 using Base::m_sluEtree;
798 using Base::m_sluFerr;
800 using Base::m_sluOptions;
801 using Base::m_sluRscale;
802 using Base::m_sluStat;
807 using Base::m_analysisIsOk;
808 using Base::m_extractedDataAreDirty;
809 using Base::m_factorizationIsOk;
811 using Base::m_isInitialized;
816 ilu_set_default_options(&m_sluOptions);
817 m_sluOptions.PrintStat = NO;
818 m_sluOptions.ConditionNumber = NO;
819 m_sluOptions.Trans = NOTRANS;
820 m_sluOptions.ColPerm = MMD_AT_PLUS_A;
823 m_sluOptions.ILU_MILU = SILU;
827 m_sluOptions.ILU_DropRule = DROP_BASIC;
832 SuperILU(SuperILU &) {}
835template <
typename MatrixType>
837 eigen_assert(m_analysisIsOk &&
"You must first call analyzePattern()");
838 if (!m_analysisIsOk) {
843 this->initFactorization(a);
846 RealScalar recip_pivot_growth, rcond;
848 StatInit(&m_sluStat);
849 SuperLU_gsisx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0], &m_sluEqued, &m_sluRscale[0],
850 &m_sluCscale[0], &m_sluL, &m_sluU, NULL, 0, &m_sluB, &m_sluX, &recip_pivot_growth, &rcond, &m_sluStat,
852 StatFree(&m_sluStat);
856 m_factorizationIsOk =
true;
859#ifndef EIGEN_PARSED_BY_DOXYGEN
860template <
typename MatrixType>
861template <
typename Rhs,
typename Dest>
863 eigen_assert(m_factorizationIsOk &&
864 "The decomposition is not in a valid state for solving, you must first call either compute() or "
865 "analyzePattern()/factorize()");
867 const int rhsCols = b.
cols();
868 eigen_assert(m_matrix.rows() == b.
rows());
870 m_sluOptions.Trans = NOTRANS;
871 m_sluOptions.Fact = FACTORED;
872 m_sluOptions.IterRefine = NOREFINE;
874 m_sluFerr.resize(rhsCols);
875 m_sluBerr.resize(rhsCols);
880 m_sluB = SluMatrix::Map(b_ref.const_cast_derived());
881 m_sluX = SluMatrix::Map(x_ref.const_cast_derived());
883 typename Rhs::PlainObject b_cpy;
884 if (m_sluEqued !=
'N') {
886 m_sluB = SluMatrix::Map(b_cpy.const_cast_derived());
890 RealScalar recip_pivot_growth, rcond;
892 StatInit(&m_sluStat);
893 SuperLU_gsisx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0], &m_sluEqued, &m_sluRscale[0],
894 &m_sluCscale[0], &m_sluL, &m_sluU, NULL, 0, &m_sluB, &m_sluX, &recip_pivot_growth, &rcond, &m_sluStat,
896 StatFree(&m_sluStat);
898 if (x.
derived().data() != x_ref.data()) x = x_ref;
900 m_info = info == 0 ? Success : NumericalIssue;
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition EigenBase.h:61
Derived & derived()
Definition EigenBase.h:49
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition EigenBase.h:59
A matrix or vector expression mapping an existing array of data.
Definition Map.h:96
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:52
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:186
constexpr void resize(Index rows, Index cols)
Definition PlainObjectBase.h:294
A matrix or vector expression mapping an existing expression.
Definition Ref.h:264
A versatible sparse matrix representation.
Definition SparseUtil.h:47
Index cols() const
Definition SparseMatrix.h:161
Index rows() const
Definition SparseMatrix.h:159
A base class for sparse solvers.
Definition SparseSolverBase.h:67
A sparse direct incomplete LU factorization and solver based on the SuperLU library.
Definition SuperLUSupport.h:746
void analyzePattern(const MatrixType &matrix)
Definition SuperLUSupport.h:771
void factorize(const MatrixType &matrix)
Definition SuperLUSupport.h:836
The base class for the direct and incomplete LU factorization of SuperLU.
Definition SuperLUSupport.h:278
void compute(const MatrixType &matrix)
Definition SuperLUSupport.h:318
ComputationInfo info() const
Reports whether previous computation was successful.
Definition SuperLUSupport.h:312
void analyzePattern(const MatrixType &)
Definition SuperLUSupport.h:329
superlu_options_t & options()
Definition SuperLUSupport.h:305
A sparse direct LU factorization and solver based on the SuperLU library.
Definition SuperLUSupport.h:431
void factorize(const MatrixType &matrix)
Definition SuperLUSupport.h:544
void analyzePattern(const MatrixType &matrix)
Definition SuperLUSupport.h:463
Expression of a triangular part in a matrix.
Definition TriangularMatrix.h:167
ComputationInfo
Definition Constants.h:438
@ SelfAdjoint
Definition Constants.h:227
@ Lower
Definition Constants.h:211
@ Upper
Definition Constants.h:213
@ NumericalIssue
Definition Constants.h:442
@ InvalidInput
Definition Constants.h:447
@ Success
Definition Constants.h:440
@ ColMajor
Definition Constants.h:318
@ RowMajor
Definition Constants.h:320
const unsigned int RowMajorBit
Definition Constants.h:70
Namespace containing all symbols from the Eigen library.
Definition Core:137
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:83
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition Meta.h:523