Generic dynamically allocated resizable storage.
Simplified implementation of std::unique_ptr, using only default deleter.
Wrapper of type containing either a value or an error message.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
#define NAMESPACE_SPH_END
Wrapper of another pointer-like object with reference-like const correctness.
Wrapper of type that either contains a value of given type, or an error message.
Const-propagating wrapper for object with point semantics.
Sparse representation of matrix of arbitrary dimension.
void insert(const Size i, const Size j, const Float value)
Adds a values to given element of the matrix.
SparseMatrix(const Size rows, const Size cols)
Constructs square n x m empty matrix.
void resize(const Size rows, const Size cols)
Changes the size of the matrix, removing all previous entries.
Expected< Array< Float > > solve(const Array< Float > &values, const Solver solver, const Float tolerance=0.)
Solver
Solvers of sparse systems.
@ BICGSTAB
Stabilized bi-conjugate gradient method, can be used for any square matrix.
@ LSCG
Least-square conjugate gradient, can be used for any matrix.
@ LU
LU factorization, precise but very slow for large problems.