Direct Matrix access
-
std::vector<std::vector<ScalarType>> danceq::internal::SparseMatrix::get_dense(void) const
Returns the dense matrix using
std::vector
.- Returns:
Dense matrix
-
ScalarType danceq::internal::SparseMatrix::get_element(const uint64_t row, const uint64_t col) const
Returns element at a certain position.
If the element does not exists zero is returned.
- Parameters:
row – Row
col – Column
- Returns:
Element
-
bool danceq::internal::SparseMatrix::is_element(const uint64_t row, const uint64_t col) const
Checks if element at a certain position.
- Parameters:
row – Row
col – Column
- Returns:
true
if element existsfalse
if it does not exists
-
std::vector<ScalarType> danceq::internal::SparseMatrix::get_diag(void) const
Returns full diagonal of matrix.
- Returns:
Diagonal of size dim