26 #ifndef CASADI_LINSOL_HPP
27 #define CASADI_LINSOL_HPP
29 #include "function.hpp"
30 #include "printable.hpp"
144 public SWIG_IF_ELSE(PrintableCommon, Printable<Linsol>) {
200 explicit Linsol(
const std::string& name,
const std::string& solver,
209 static bool test_cast(
const SharedObjectInternal* ptr);
217 static Linsol create(LinsolInternal* node);
312 static std::string
doc(
const std::string& name);
621 int sfact(
const double* A,
int mem=0)
const;
622 int nfact(
const double* A,
int mem=0)
const;
623 int solve(
const double* A,
double* x, casadi_int nrhs=1,
bool tr=
false,
int mem=0)
const;
624 double det(
const double* A,
int mem = 0)
const;
625 casadi_int neig(
const double* A,
int mem=0)
const;
626 casadi_int rank(
const double* A,
int mem=0)
const;
630 casadi_int checkout()
const;
633 void release(
int mem)
const;
740 CASADI_EXPORT std::string
doc_linsol(
const std::string& name);
Helper class for Serialization.
Linsol(const std::string &name, const std::string &solver, const Sparsity &sp, const Dict &opts=Dict())
Create a linear solver.
casadi_int rank(const DM &A) const
Matrix rank.
static bool has_plugin(const std::string &name)
Check if a plugin is available.
static void load_plugin(const std::string &name)
Explicitly load a plugin dynamically.
void nfact(const DM &A) const
Numeric factorization of the linear system.
Linsol()
Default constructor (a null object)
double det(const DM &A) const
Matrix determinant.
MX solve(const MX &A, const MX &B, bool tr=false) const
Solve the linear system A*X = B (or A'*X = B with tr true)
LinsolInternal * operator->()
Access functions of the node.
Dict stats(int mem=1) const
Get all statistics obtained at the end of the last evaluate call.
const LinsolInternal * operator->() const
static std::string doc(const std::string &name)
Get solver specific documentation.
std::string plugin_name() const
Query plugin name.
const Sparsity & sparsity() const
Get the sparsity pattern of A fixed at construction.
DM solve(const DM &A, const DM &B, bool tr=false) const
Solve the linear system A*X = B (or A'*X = B with tr true)
static std::string type_name()
Get type name.
void sfact(const DM &A) const
Symbolic factorization of the linear system, e.g. selecting pivots.
casadi_int neig(const DM &A) const
Number of negative eigenvalues.
MX det(const MX &A) const
Matrix determinant as an MX graph node.
Helper class for Serialization.
GenericShared implements a reference counting framework similar for efficient and.
CASADI_EXPORT std::string doc_linsol(const std::string &name)
Get the documentation string of a linear solver plugin.
CASADI_EXPORT bool has_linsol(const std::string &name)
Check if a linear solver plugin is available.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
CASADI_EXPORT void load_linsol(const std::string &name)
Explicitly load a linear solver plugin.