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

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

#include "include/SparseMatrix.hpp"

Inheritance diagram for swSim::SparseMatrix:

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

Detailed Description

Defines data structures for providing sparse matrices to KernelComposer.

Constructor & Destructor Documentation

◆ SparseMatrix() [1/2]

swSim::SparseMatrix::SparseMatrix ( )

Create the SparseMatrix.

◆ SparseMatrix() [2/2]

swSim::SparseMatrix::SparseMatrix ( std::string  nm,
int  rw,
int  col 
)

Create the SparseMatrix with name, rows and columns.

◆ ~SparseMatrix()

swSim::SparseMatrix::~SparseMatrix ( )

Destroy the SparseMatrix.

Member Function Documentation

◆ setName()

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

Set the name of the SparseMatrix.

◆ setSize()

void swSim::SparseMatrix::setSize ( int  rw,
int  col 
)

Resize this matrix.

◆ getName()

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

Get Key-Name for this matrix.

◆ getNonZeroLength()

size_t swSim::SparseMatrix::getNonZeroLength ( ) const

Get length of value array.

◆ getValueArray()

double * swSim::SparseMatrix::getValueArray ( )

Get pointer to head of value array.

◆ getColumnIndexArray()

int * swSim::SparseMatrix::getColumnIndexArray ( )

Get pointer to head of column index array.

◆ getRowpointerArray()

int * swSim::SparseMatrix::getRowpointerArray ( )

Get pointer to head of rowpointer array.

◆ getRowpointerLength()

size_t swSim::SparseMatrix::getRowpointerLength ( ) const

Get length of rowpointer array.

◆ getRowCount()

int swSim::SparseMatrix::getRowCount ( ) const

Get row dimension of the matrix.

◆ getColumnCount()

int swSim::SparseMatrix::getColumnCount ( ) const

Get column dimension of the matrix.

◆ SetValue()

void swSim::SparseMatrix::SetValue ( int  i,
int  j,
double  val 
)

Set the value at row i and column j.

◆ GetValue()

double swSim::SparseMatrix::GetValue ( int  i,
int  j 
)

Get the value at row i and column j.

◆ AddValue()

void swSim::SparseMatrix::AddValue ( int  i,
int  j,
double  val 
)

Add to the value at row i and column j.

◆ Prune()

void swSim::SparseMatrix::Prune ( )

Prune Zero values.

Member Data Documentation

◆ mat

Eigen::SparseMatrix<double,1> swSim::SparseMatrix::mat

Underlying Matrix.


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