Defines data structures for providing sparse vectors to KernelComposer. More...
#include "include/SparseVector.hpp"
Public Member Functions | |
SparseVector () | |
Create the SparseVector. More... | |
SparseVector (std::string nm, int length) | |
Create the SparseVector with a length and name. More... | |
~SparseVector () | |
Destroy the SparseVector. More... | |
void | setName (std::string nm) |
Set the name of the SparseVector. More... | |
std::string | getName () const |
Get Key-Name for this vector. More... | |
double * | getValueArray () |
Get pointer to head of value array. More... | |
int * | getIndexArray () |
Get pointer to head of index array. More... | |
size_t | getNonZeroLength () const |
Get length of value array. More... | |
size_t | getFullLength () const |
Get full length of vector (incl. More... | |
void | update (int kt) |
[Deprecated] Update Sparse vector values based on time index More... | |
Public Attributes | |
Eigen::SparseVector< double > | vec |
Underlying Vector. More... | |
Defines data structures for providing sparse vectors to KernelComposer.
swSim::SparseVector::SparseVector | ( | ) |
Create the SparseVector.
swSim::SparseVector::SparseVector | ( | std::string | nm, |
int | length | ||
) |
Create the SparseVector with a length and name.
swSim::SparseVector::~SparseVector | ( | ) |
Destroy the SparseVector.
void swSim::SparseVector::setName | ( | std::string | nm | ) |
Set the name of the SparseVector.
std::string swSim::SparseVector::getName | ( | ) | const |
Get Key-Name for this vector.
double * swSim::SparseVector::getValueArray | ( | ) |
Get pointer to head of value array.
int * swSim::SparseVector::getIndexArray | ( | ) |
Get pointer to head of index array.
size_t swSim::SparseVector::getNonZeroLength | ( | ) | const |
Get length of value array.
size_t swSim::SparseVector::getFullLength | ( | ) | const |
Get full length of vector (incl.
zeros)
void swSim::SparseVector::update | ( | int | kt | ) |
[Deprecated] Update Sparse vector values based on time index
Eigen::SparseVector<double> swSim::SparseVector::vec |
Underlying Vector.