Defines data structures for providing sparse matrices to KernelComposer. More...
#include "include/SparseMatrix.hpp"
Public Member Functions | |
SparseMatrix () | |
Create the SparseMatrix. More... | |
SparseMatrix (std::string nm, int rw, int col) | |
Create the SparseMatrix with name, rows and columns. More... | |
~SparseMatrix () | |
Destroy the SparseMatrix. More... | |
void | setName (std::string nm) |
Set the name of the SparseMatrix. More... | |
void | setSize (int rw, int col) |
Resize this matrix. More... | |
std::string | getName () const |
Get Key-Name for this matrix. More... | |
size_t | getNonZeroLength () const |
Get length of value array. More... | |
double * | getValueArray () |
Get pointer to head of value array. More... | |
int * | getColumnIndexArray () |
Get pointer to head of column index array. More... | |
int * | getRowpointerArray () |
Get pointer to head of rowpointer array. More... | |
size_t | getRowpointerLength () const |
Get length of rowpointer array. More... | |
int | getRowCount () const |
Get row dimension of the matrix. More... | |
int | getColumnCount () const |
Get column dimension of the matrix. More... | |
void | SetValue (int i, int j, double val) |
Set the value at row i and column j. More... | |
double | GetValue (int i, int j) |
Get the value at row i and column j. More... | |
void | AddValue (int i, int j, double val) |
Add to the value at row i and column j. More... | |
void | Prune () |
Prune Zero values. More... | |
Public Attributes | |
Eigen::SparseMatrix< double, 1 > | mat |
Underlying Matrix. More... | |
Defines data structures for providing sparse matrices to KernelComposer.
swSim::SparseMatrix::SparseMatrix | ( | ) |
Create the SparseMatrix.
swSim::SparseMatrix::SparseMatrix | ( | std::string | nm, |
int | rw, | ||
int | col | ||
) |
Create the SparseMatrix with name, rows and columns.
swSim::SparseMatrix::~SparseMatrix | ( | ) |
Destroy the SparseMatrix.
void swSim::SparseMatrix::setName | ( | std::string | nm | ) |
Set the name of the SparseMatrix.
void swSim::SparseMatrix::setSize | ( | int | rw, |
int | col | ||
) |
Resize this matrix.
std::string swSim::SparseMatrix::getName | ( | ) | const |
Get Key-Name for this matrix.
size_t swSim::SparseMatrix::getNonZeroLength | ( | ) | const |
Get length of value array.
double * swSim::SparseMatrix::getValueArray | ( | ) |
Get pointer to head of value array.
int * swSim::SparseMatrix::getColumnIndexArray | ( | ) |
Get pointer to head of column index array.
int * swSim::SparseMatrix::getRowpointerArray | ( | ) |
Get pointer to head of rowpointer array.
size_t swSim::SparseMatrix::getRowpointerLength | ( | ) | const |
Get length of rowpointer array.
int swSim::SparseMatrix::getRowCount | ( | ) | const |
Get row dimension of the matrix.
int swSim::SparseMatrix::getColumnCount | ( | ) | const |
Get column dimension of the matrix.
void swSim::SparseMatrix::SetValue | ( | int | i, |
int | j, | ||
double | val | ||
) |
Set the value at row i and column j.
double swSim::SparseMatrix::GetValue | ( | int | i, |
int | j | ||
) |
Get the value at row i and column j.
void swSim::SparseMatrix::AddValue | ( | int | i, |
int | j, | ||
double | val | ||
) |
Add to the value at row i and column j.
void swSim::SparseMatrix::Prune | ( | ) |
Prune Zero values.
Eigen::SparseMatrix<double,1> swSim::SparseMatrix::mat |
Underlying Matrix.