xerus
a general purpose tensor library
|
wrapper class for the cholmod sparse matrix objects More...
#include <cholmod_wrapper.h>
Public Types | |
using | ptr_type = std::unique_ptr< cholmod_sparse, std::function< void(cholmod_sparse *)> > |
Public Member Functions | |
CholmodSparse (cholmod_sparse *_matrix) | |
stores the given cholmod_sparse object in this wrapper. NOTE: the object must have been created by the same thread that uses this constructor! More... | |
CholmodSparse (const size_t _m, const size_t _n, const size_t _N) | |
Creates a cholmod sparse matrix with given dimensions and number of entries. More... | |
CholmodSparse (const std::map< size_t, double > &_input, const size_t _m, const size_t _n, const bool _transpose) | |
Converts the given tensor to the cholmod sparse format using the given matrification. More... | |
CholmodSparse | operator* (const CholmodSparse &_rhs) const |
Calculates the Matrix Matrix product with another sparse matrix. More... | |
std::map< size_t, double > | to_map (double _alpha=1.0) const |
Transforms a cholmod sparse matrix to sparse Tensor format. More... | |
void | transpose () |
transposes the represented sparse matrix. More... | |
Static Public Member Functions | |
static std::tuple< std::map< size_t, double >, std::map< size_t, double >, size_t > | cq (const std::map< size_t, double > &_A, const bool _transposeA, size_t _m, size_t _n, bool _fullrank) |
calculates the sparse CQ decomposition More... | |
static void | matrix_matrix_product (std::map< size_t, double > &_C, const size_t _leftDim, const size_t _rightDim, const double _alpha, const std::map< size_t, double > &_A, const bool _transposeA, const size_t _midDim, const std::map< size_t, double > &_B, const bool _transposeB) |
Calculates the Matrix Matrix product between two sparse matrices. More... | |
static std::tuple< std::map< size_t, double >, std::map< size_t, double >, size_t > | qc (const std::map< size_t, double > &_A, const bool _transposeA, size_t _m, size_t _n, bool _fullrank) |
calculates the sparse QR decomposition (or qc if fullrank = false) More... | |
static void | solve_dense_rhs (double *_x, size_t _xDim, const std::map< size_t, double > &_A, const bool _transposeA, const double *_b, size_t _bDim) |
solve operator / for dense right hand sites More... | |
static void | solve_sparse_rhs (std::map< size_t, double > &_x, size_t _xDim, const std::map< size_t, double > &_A, const bool _transposeA, const std::map< size_t, double > &_b, size_t _bDim) |
solve operator / for sparse right hand sites More... | |
Public Attributes | |
ptr_type | matrix |
wrapper class for the cholmod sparse matrix objects
Definition at line 61 of file cholmod_wrapper.h.
using xerus::internal::CholmodSparse::ptr_type = std::unique_ptr<cholmod_sparse, std::function<void(cholmod_sparse*)> > |
Definition at line 63 of file cholmod_wrapper.h.
xerus::internal::CholmodSparse::CholmodSparse | ( | cholmod_sparse * | _matrix | ) |
stores the given cholmod_sparse object in this wrapper. NOTE: the object must have been created by the same thread that uses this constructor!
Definition at line 85 of file cholmod_wrapper.cpp.
xerus::internal::CholmodSparse::CholmodSparse | ( | const size_t | _m, |
const size_t | _n, | ||
const size_t | _N | ||
) |
Creates a cholmod sparse matrix with given dimensions and number of entries.
Definition at line 88 of file cholmod_wrapper.cpp.
xerus::internal::CholmodSparse::CholmodSparse | ( | const std::map< size_t, double > & | _input, |
const size_t | _m, | ||
const size_t | _n, | ||
const bool | _transpose | ||
) |
Converts the given tensor to the cholmod sparse format using the given matrification.
Definition at line 94 of file cholmod_wrapper.cpp.
|
static |
calculates the sparse CQ decomposition
Definition at line 237 of file cholmod_wrapper.cpp.
|
static |
Calculates the Matrix Matrix product between two sparse matrices.
Definition at line 154 of file cholmod_wrapper.cpp.
CholmodSparse xerus::internal::CholmodSparse::operator* | ( | const CholmodSparse & | _rhs | ) | const |
Calculates the Matrix Matrix product with another sparse matrix.
Definition at line 143 of file cholmod_wrapper.cpp.
|
static |
calculates the sparse QR decomposition (or qc if fullrank = false)
Definition at line 213 of file cholmod_wrapper.cpp.
|
static |
solve operator / for dense right hand sites
Definition at line 185 of file cholmod_wrapper.cpp.
|
static |
solve operator / for sparse right hand sites
Definition at line 171 of file cholmod_wrapper.cpp.
std::map< size_t, double > xerus::internal::CholmodSparse::to_map | ( | double | _alpha = 1.0 | ) | const |
Transforms a cholmod sparse matrix to sparse Tensor format.
Definition at line 128 of file cholmod_wrapper.cpp.
void xerus::internal::CholmodSparse::transpose | ( | ) |
transposes the represented sparse matrix.
Definition at line 147 of file cholmod_wrapper.cpp.
ptr_type xerus::internal::CholmodSparse::matrix |
Definition at line 64 of file cholmod_wrapper.h.