1.5.0
CCC
 
NF_Triplet Class Reference

#include <NF_Triplet.hpp>

Detailed Description

Stores the contents of a sparse matrix in Triplet form The format is adapter to Eigen or to csparse

Public Member Functions

 NF_Triplet ()
 
 NF_Triplet (const NF_Triplet &r)
 
NF_Tripletoperator= (const NF_Triplet &)
 
virtual ~NF_Triplet ()
 
void add (int irow, int icol, double value)
 
int getNumber () const
 
int getNRows () const
 
int getNCols () const
 
void force (int nrow, int ncol)
 
int getRow (int i) const
 
int getCol (int i) const
 
double getValue (int i) const
 
VectorDouble getValues () const
 
VectorInt getRows (bool flag_from_1=false) const
 
VectorInt getCols (bool flag_from_1=false) const
 
void appendInPlace (const NF_Triplet &T2)
 
cs * buildCsFromTriplet () const
 
Eigen::SparseMatrix< double > buildEigenFromTriplet () const
 

Static Public Member Functions

static NF_Triplet createFromCs (const cs *mat, int shiftRow=0, int shiftCol=0)
 
static NF_Triplet createFromEigen (const Eigen::SparseMatrix< double > &mat, int shiftRow=0, int shiftCol=0)
 

Public Attributes

 DECLARE_TOTL
 Has a specific implementation in the Target language. More...
 

Constructor & Destructor Documentation

◆ NF_Triplet() [1/2]

NF_Triplet::NF_Triplet ( )

◆ NF_Triplet() [2/2]

NF_Triplet::NF_Triplet ( const NF_Triplet r)

◆ ~NF_Triplet()

NF_Triplet::~NF_Triplet ( )
virtual

Member Function Documentation

◆ add()

void NF_Triplet::add ( int  irow,
int  icol,
double  value 
)

◆ appendInPlace()

void NF_Triplet::appendInPlace ( const NF_Triplet T2)

Append NF_Triplet 'T2' at the end of the current one

Parameters
T2NF_Triplet to be appended

◆ buildCsFromTriplet()

cs * NF_Triplet::buildCsFromTriplet ( ) const

◆ buildEigenFromTriplet()

Eigen::SparseMatrix< double > NF_Triplet::buildEigenFromTriplet ( ) const

◆ createFromCs()

NF_Triplet NF_Triplet::createFromCs ( const cs *  mat,
int  shiftRow = 0,
int  shiftCol = 0 
)
static

◆ createFromEigen()

NF_Triplet NF_Triplet::createFromEigen ( const Eigen::SparseMatrix< double > &  mat,
int  shiftRow = 0,
int  shiftCol = 0 
)
static

◆ force()

void NF_Triplet::force ( int  nrow,
int  ncol 
)

Force the dimension of the Sparse matrix This is done by adding a fictitious sample at position 'nrow-1' and 'ncol-1' with value 0

Parameters
nrowUltimate number of rows
ncolUltimate number of columns

◆ getCol()

int NF_Triplet::getCol ( int  i) const

◆ getCols()

VectorInt NF_Triplet::getCols ( bool  flag_from_1 = false) const

◆ getNCols()

int NF_Triplet::getNCols ( ) const
inline

◆ getNRows()

int NF_Triplet::getNRows ( ) const
inline

◆ getNumber()

int NF_Triplet::getNumber ( ) const
inline

◆ getRow()

int NF_Triplet::getRow ( int  i) const

◆ getRows()

VectorInt NF_Triplet::getRows ( bool  flag_from_1 = false) const

◆ getValue()

double NF_Triplet::getValue ( int  i) const

◆ getValues()

VectorDouble NF_Triplet::getValues ( ) const

◆ operator=()

NF_Triplet & NF_Triplet::operator= ( const NF_Triplet r)

Member Data Documentation

◆ DECLARE_TOTL

NF_Triplet::DECLARE_TOTL

Has a specific implementation in the Target language.


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