Go to the documentation of this file.
10 #ifndef EIGEN_KLUSUPPORT_H
11 #define EIGEN_KLUSUPPORT_H
34 inline int klu_solve(klu_symbolic *Symbolic, klu_numeric *Numeric,
Index ldim,
Index nrhs,
double B [ ], klu_common *Common,
double) {
35 return klu_solve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs),
B, Common);
38 inline int klu_solve(klu_symbolic *Symbolic, klu_numeric *Numeric,
Index ldim,
Index nrhs, std::complex<double>
B[], klu_common *Common, std::complex<double>) {
39 return klu_z_solve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), &
numext::real_ref(
B[0]), Common);
42 inline int klu_tsolve(klu_symbolic *Symbolic, klu_numeric *Numeric,
Index ldim,
Index nrhs,
double B[], klu_common *Common,
double) {
43 return klu_tsolve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs),
B, Common);
46 inline int klu_tsolve(klu_symbolic *Symbolic, klu_numeric *Numeric,
Index ldim,
Index nrhs, std::complex<double>
B[], klu_common *Common, std::complex<double>) {
47 return klu_z_tsolve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), &
numext::real_ref(
B[0]), 0, Common);
50 inline klu_numeric*
klu_factor(
int Ap [ ],
int Ai [ ],
double Ax [ ], klu_symbolic *Symbolic, klu_common *Common,
double) {
51 return klu_factor(Ap, Ai, Ax, Symbolic, Common);
54 inline klu_numeric*
klu_factor(
int Ap[],
int Ai[], std::complex<double> Ax[], klu_symbolic *Symbolic, klu_common *Common, std::complex<double>) {
59 template<
typename _MatrixType>
90 template<
typename InputMatrixType>
117 #if 0 // not implemented yet
146 template<
typename InputMatrixType>
162 template<
typename InputMatrixType>
200 template<
typename InputMatrixType>
213 template<
typename BDerived,
typename XDerived>
216 #if 0 // not implemented yet
219 void extractData()
const;
263 template<
typename MatrixDerived>
280 #if 0 // not implemented yet
302 #if 0 // not implemented yet
303 template<
typename MatrixType>
304 void KLU<MatrixType>::extractData()
const
306 if (m_extractedDataAreDirty)
308 eigen_assert(
false &&
"KLU: extractData Not Yet Implemented");
316 m_l.resizeNonZeros(lnz);
319 m_u.resizeNonZeros(unz);
326 m_u.outerIndexPtr(), m_u.innerIndexPtr(), m_u.valuePtr(),
327 m_p.data(), m_q.data(), 0, 0, 0, m_numeric);
329 m_extractedDataAreDirty =
false;
333 template<
typename MatrixType>
336 eigen_assert(
false &&
"KLU: extractData Not Yet Implemented");
341 template<
typename MatrixType>
342 template<
typename BDerived,
typename XDerived>
347 eigen_assert(m_factorizationIsOk &&
"The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()");
350 int info =
klu_solve(m_symbolic, m_numeric,
b.rows(), rhsCols,
x.const_cast_derived().data(),
const_cast<klu_common*
>(&m_common),
Scalar());
358 #endif // EIGEN_KLUSUPPORT_H
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)
void analyzePattern_impl()
Namespace containing all symbols from the Eigen library.
KLU(const InputMatrixType &matrix)
MatrixType::StorageIndex StorageIndex
void _solve_impl(const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
klu_numeric * klu_factor(int Ap[], int Ai[], double Ax[], klu_symbolic *Symbolic, klu_common *Common, double)
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
const unsigned int RowMajorBit
Matrix< int, MatrixType::RowsAtCompileTime, 1 > IntColVectorType
klu_symbolic * m_symbolic
void determinant(const MatrixType &m)
Ref< const KLUMatrixType, StandardCompressedFormat > KLUMatrixRef
int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, double)
void grab(const EigenBase< MatrixDerived > &A)
SparseMatrix< Scalar > LUMatrixType
void analyzePattern(const InputMatrixType &matrix)
SparseMatrix< Scalar, ColMajor, int > KLUMatrixType
void grab(const KLUMatrixRef &A)
EIGEN_DEVICE_FUNC internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar &x)
ComputationInfo info() const
Reports whether previous computation was successful.
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
NumTraits< Scalar >::Real RealScalar
MatrixType::Scalar Scalar
MatrixType::RealScalar RealScalar
A base class for sparse solvers.
bool m_extractedDataAreDirty
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
SparseSolverBase< KLU< _MatrixType > > Base
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
const klu_common & kluCommon() const
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
int klu_solve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, double B[], klu_common *Common, double)
A sparse LU factorization and solver based on KLU.
Base class for all dense matrices, vectors, and expressions.
bool _solve_impl(const MatrixBase< BDerived > &b, MatrixBase< XDerived > &x) const
void factorize(const InputMatrixType &matrix)
int klu_tsolve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, double B[], klu_common *Common, double)
void compute(const InputMatrixType &matrix)
Matrix< int, 1, MatrixType::ColsAtCompileTime > IntRowVectorType
Matrix< Scalar, Dynamic, 1 > Vector
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:01:28