1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

 DECLARE_TOTL
 Has a specific implementation in the Target language.
 

Constructor & Destructor Documentation

◆ NF_Triplet() [1/2]

gstlrn::NF_Triplet::NF_Triplet ( )

◆ NF_Triplet() [2/2]

gstlrn::NF_Triplet::NF_Triplet ( const NF_Triplet r)

◆ ~NF_Triplet()

gstlrn::NF_Triplet::~NF_Triplet ( )
virtual

Member Function Documentation

◆ add()

void gstlrn::NF_Triplet::add ( Id  irow,
Id  icol,
double  value 
)

◆ appendInPlace()

void gstlrn::NF_Triplet::appendInPlace ( const NF_Triplet T2)

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

Parameters
T2NF_Triplet to be appended

◆ buildEigenFromTriplet()

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

◆ createFromEigen()

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

◆ force()

void gstlrn::NF_Triplet::force ( Id  nrow,
Id  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()

Id gstlrn::NF_Triplet::getCol ( Id  i) const

◆ getCols()

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

◆ getNCols()

Id gstlrn::NF_Triplet::getNCols ( ) const
inline

◆ getNElements()

Id gstlrn::NF_Triplet::getNElements ( ) const
inline

◆ getNRows()

Id gstlrn::NF_Triplet::getNRows ( ) const
inline

◆ getRow()

Id gstlrn::NF_Triplet::getRow ( Id  i) const

◆ getRows()

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

◆ getValue()

double gstlrn::NF_Triplet::getValue ( Id  i) const

◆ getValues()

gstlrn::NF_Triplet::getValues ( ) const

◆ operator=()

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

Member Data Documentation

◆ DECLARE_TOTL

gstlrn::NF_Triplet::DECLARE_TOTL

Has a specific implementation in the Target language.


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