Linear solver. More...
#include <linsol.hpp>
Create a solver for linear systems of equations Solves the linear system A*X = B or A^T*X = B for X with A square and non-singular
If A is structurally singular, an error will be thrown during init. If A is numerically singular, the prepare step will fail.
- csparse
- ma27
- lapacklu
- lapackqr
- mumps
- ldl
- qr
- tridiag
Note: some of the plugins in this list might not be available on your system. Also, there might be extra plugins available to you that are not listed here. You can obtain their documentation with Linsol.doc("myextraplugin")
Linsol with CSparseCholesky Interface
Extra doc: https://github.com/casadi/casadi/wiki/L_21u
Linsol with CSparse Interface
Extra doc: https://github.com/casadi/casadi/wiki/L_21t
Interface to the sparse direct linear solver MA27 Works for symmetric indefinite systems Partly adopted from qpOASES 3.2
Extra doc: https://github.com/casadi/casadi/wiki/L_229
This class solves the linear system A.x=b
by making an LU factorization of A:
A = L.U
, with L lower and U upper triangular
Extra doc: https://github.com/casadi/casadi/wiki/L_22h
Id | Type | Description |
---|---|---|
allow_equilibration_failure | OT_BOOL | Non-fatal error when equilibration fails |
equilibration | OT_BOOL | Equilibrate the matrix |
This class solves the linear system A.x=b
by making an QR factorization of A:
A = Q.R
, with Q orthogonal and R upper triangular
Extra doc: https://github.com/casadi/casadi/wiki/L_22g
Id | Type | Description |
---|---|---|
max_nrhs | OT_INT | Maximum number of right-hand-sides that get processed in a single pass [default:10]. |
Interface to the sparse direct linear solver MUMPS Works for symmetric indefinite systems
Extra doc: https://github.com/casadi/casadi/wiki/L_22t
Id | Type | Description |
---|---|---|
posdef | OT_BOOL | Positive definite |
symmetric | OT_BOOL | Symmetric matrix |
Linear solver using sparse direct LDL factorization
Extra doc: https://github.com/casadi/casadi/wiki/L_233
Linear solver using sparse direct QR factorization
Extra doc: https://github.com/casadi/casadi/wiki/L_22z
Linear solver for tridiagonal matrices
Extra doc: https://github.com/casadi/casadi/wiki/L_22v
Linear solver for sparse least-squares problems Inspired from https://github.com/scipy/scipy/blob/v0.14.0/scipy/sparse/linalg/isolve/lsqr.py#L96
Extra doc: https://github.com/casadi/casadi/wiki/L_230
Linsol based on QR factorization with sparsity pattern based reordering without partial pivoting
Extra doc: https://github.com/casadi/casadi/wiki/L_231
Id | Type | Description |
---|---|---|
fopts | OT_DICT | Options to be passed to generated function objects |
Extra doc: https://github.com/casadi/casadi/wiki/L_1kh
Definition at line 53 of file linsol.hpp.
Public Member Functions | |
Linsol () | |
Default constructor. More... | |
Linsol (const std::string &name, const std::string &solver, const Sparsity &sp, const Dict &opts=Dict()) | |
Constructor. More... | |
LinsolInternal * | operator-> () |
Access functions of the node. More... | |
const LinsolInternal * | operator-> () const |
std::string | plugin_name () const |
Query plugin name. More... | |
const Sparsity & | sparsity () const |
Get linear system sparsity. More... | |
void | sfact (const DM &A) const |
Symbolic factorization of the linear system, e.g. selecting pivots. More... | |
void | nfact (const DM &A) const |
Numeric factorization of the linear system. More... | |
casadi_int | neig (const DM &A) const |
Number of negative eigenvalues. More... | |
casadi_int | rank (const DM &A) const |
Matrix rank. More... | |
Dict | stats (int mem=1) const |
Get all statistics obtained at the end of the last evaluate call. More... | |
std::string | class_name () const |
Get class name. More... | |
void | disp (std::ostream &stream, bool more=false) const |
Print a description of the object. More... | |
std::string | get_str (bool more=false) const |
Get string representation. More... | |
bool | is_null () const |
Is a null pointer? More... | |
casadi_int | __hash__ () const |
Returns a number that is unique for a given Node. More... | |
DM | solve (const DM &A, const DM &B, bool tr=false) const |
MX | solve (const MX &A, const MX &B, bool tr=false) const |
Static Public Member Functions | |
static std::string | type_name () |
Get type name. More... | |
static bool | has_plugin (const std::string &name) |
Check if a plugin is available. More... | |
static void | load_plugin (const std::string &name) |
Explicitly load a plugin dynamically. More... | |
static std::string | doc (const std::string &name) |
Get solver specific documentation. More... | |
casadi::Linsol::Linsol | ( | ) |
|
explicit |
|
inherited |
If the Object does not point to any node, "0" is returned.
Extra doc: https://github.com/casadi/casadi/wiki/L_av
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_au
|
inherited |
|
static |
|
inlineinherited |
Definition at line 138 of file shared_object.hpp.
|
static |
|
inherited |
|
static |
casadi_int casadi::Linsol::neig | ( | const DM & | A | ) | const |
Not available for all solvers
Extra doc: https://github.com/casadi/casadi/wiki/L_1kk
void casadi::Linsol::nfact | ( | const DM & | A | ) | const |
LinsolInternal* casadi::Linsol::operator-> | ( | ) |
const LinsolInternal* casadi::Linsol::operator-> | ( | ) | const |
std::string casadi::Linsol::plugin_name | ( | ) | const |
casadi_int casadi::Linsol::rank | ( | const DM & | A | ) | const |
Not available for all solvers
Extra doc: https://github.com/casadi/casadi/wiki/L_1kl
void casadi::Linsol::sfact | ( | const DM & | A | ) | const |
Solve linear system of equations
Solve linear system of equations
const Sparsity& casadi::Linsol::sparsity | ( | ) | const |
Dict casadi::Linsol::stats | ( | int | mem = 1 | ) | const |
|
inlinestatic |
Extra doc: https://github.com/casadi/casadi/wiki/L_1ki
Definition at line 60 of file linsol.hpp.