swSim  Version 1.0
All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Public Attributes | List of all members
swSim::SparseVector Class Reference

Defines data structures for providing sparse vectors to KernelComposer. More...

#include "include/SparseVector.hpp"

Inheritance diagram for swSim::SparseVector:

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...
 

Detailed Description

Defines data structures for providing sparse vectors to KernelComposer.

Constructor & Destructor Documentation

◆ SparseVector() [1/2]

swSim::SparseVector::SparseVector ( )

Create the SparseVector.

◆ SparseVector() [2/2]

swSim::SparseVector::SparseVector ( std::string  nm,
int  length 
)

Create the SparseVector with a length and name.

◆ ~SparseVector()

swSim::SparseVector::~SparseVector ( )

Destroy the SparseVector.

Member Function Documentation

◆ setName()

void swSim::SparseVector::setName ( std::string  nm)

Set the name of the SparseVector.

◆ getName()

std::string swSim::SparseVector::getName ( ) const

Get Key-Name for this vector.

◆ getValueArray()

double * swSim::SparseVector::getValueArray ( )

Get pointer to head of value array.

◆ getIndexArray()

int * swSim::SparseVector::getIndexArray ( )

Get pointer to head of index array.

◆ getNonZeroLength()

size_t swSim::SparseVector::getNonZeroLength ( ) const

Get length of value array.

◆ getFullLength()

size_t swSim::SparseVector::getFullLength ( ) const

Get full length of vector (incl.

zeros)

◆ update()

void swSim::SparseVector::update ( int  kt)

[Deprecated] Update Sparse vector values based on time index

Member Data Documentation

◆ vec

Eigen::SparseVector<double> swSim::SparseVector::vec

Underlying Vector.


The documentation for this class was generated from the following files: