FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
fei::CSVec Class Reference

#include <fei_CSVec.hpp>

Public Member Functions

 CSVec (unsigned sz=0)
 
virtual ~CSVec ()
 
CSVecoperator= (const CSVec &invec)
 
std::vector< int > & indices ()
 
const std::vector< int > & indices () const
 
std::vector< double > & coefs ()
 
const std::vector< double > & coefs () const
 
size_t size () const
 
void clear ()
 
bool operator== (const CSVec &rhs) const
 
bool operator!= (const CSVec &rhs) const
 
void subtract (const CSVec &rhs)
 

Private Attributes

std::vector< int > indices_
 
std::vector< double > coefs_
 

Detailed Description

'Compressed Sparse Vector' stored as two std::vectors: a vector of ints for the indices and a vector of doubles for the coefficients.

Non-member functions add_entry and put_entry maintain sortedness of the vector when inserting new entries.

Definition at line 24 of file fei_CSVec.hpp.

Constructor & Destructor Documentation

◆ CSVec()

fei::CSVec::CSVec ( unsigned sz = 0)

Definition at line 15 of file fei_CSVec.cpp.

◆ ~CSVec()

fei::CSVec::~CSVec ( )
virtual

Definition at line 21 of file fei_CSVec.cpp.

Member Function Documentation

◆ operator=()

CSVec & fei::CSVec::operator= ( const CSVec & invec)

Definition at line 26 of file fei_CSVec.cpp.

References coefs_, and indices_.

◆ indices() [1/2]

std::vector< int > & fei::CSVec::indices ( )
inline

◆ indices() [2/2]

const std::vector< int > & fei::CSVec::indices ( ) const
inline

Definition at line 32 of file fei_CSVec.hpp.

References indices_.

◆ coefs() [1/2]

std::vector< double > & fei::CSVec::coefs ( )
inline

◆ coefs() [2/2]

const std::vector< double > & fei::CSVec::coefs ( ) const
inline

Definition at line 34 of file fei_CSVec.hpp.

References coefs_.

◆ size()

size_t fei::CSVec::size ( ) const
inline

◆ clear()

void fei::CSVec::clear ( )
inline

◆ operator==()

bool fei::CSVec::operator== ( const CSVec & rhs) const
inline

Definition at line 40 of file fei_CSVec.hpp.

References coefs_, and indices_.

◆ operator!=()

bool fei::CSVec::operator!= ( const CSVec & rhs) const
inline

Definition at line 44 of file fei_CSVec.hpp.

References coefs_, and indices_.

◆ subtract()

void fei::CSVec::subtract ( const CSVec & rhs)

Definition at line 94 of file fei_CSVec.cpp.

References fei::add_entry(), coefs_, and indices_.

Referenced by fei::Reducer::assembleReducedMatrix().

Member Data Documentation

◆ indices_

std::vector<int> fei::CSVec::indices_
private

Definition at line 51 of file fei_CSVec.hpp.

Referenced by clear(), indices(), indices(), operator!=(), operator=(), operator==(), size(), and subtract().

◆ coefs_

std::vector<double> fei::CSVec::coefs_
private

Definition at line 52 of file fei_CSVec.hpp.

Referenced by clear(), coefs(), coefs(), operator!=(), operator=(), operator==(), and subtract().


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