Functions

int Eigen::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. More...
 

Detailed Description

This module provides an interface to the KLU library which is part of the suitesparse package. It provides the following factorization class:

In order to use this module, the klu and btf headers must be accessible from the include paths, and your binary must be linked to the klu library and its dependencies. The dependencies depend on how umfpack has been compiled. For a cmake based project, you can use our FindKLU.cmake module to help you in this task.

Function Documentation

◆ klu_solve()

int Eigen::klu_solve ( klu_symbolic *  Symbolic,
klu_numeric *  Numeric,
Index  ldim,
Index  nrhs,
double  B[],
klu_common *  Common,
double   
)
inline

A sparse LU factorization and solver based on KLU.

This class allows to solve for A.X = B sparse linear problems via a LU factorization using the KLU library. The sparse matrix A must be squared and full rank. The vectors or matrices X and B can be either dense or sparse.

Warning
The input matrix A should be in a compressed and column-major form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
Template Parameters
MatrixType_the type of the sparse matrix A, it must be a SparseMatrix<>

This class follows the sparse solver concept .

See also
Sparse solver concept, class UmfPackLU, class SparseLU

Definition at line 36 of file KLUSupport.h.

36  {
37  return klu_solve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), B, Common);
38 }
MatrixXf B
int klu_solve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, std::complex< double >B[], klu_common *Common, std::complex< double >)
Definition: KLUSupport.h:40