FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

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

Definition at line 15 of file fei_CSVec.cpp.

fei::CSVec::~CSVec ( )
virtual

Definition at line 21 of file fei_CSVec.cpp.

Member Function Documentation

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

Definition at line 26 of file fei_CSVec.cpp.

References coefs_, and indices_.

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

Definition at line 32 of file fei_CSVec.hpp.

References indices_.

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

Definition at line 34 of file fei_CSVec.hpp.

References coefs_.

size_t fei::CSVec::size ( ) const
inline
void fei::CSVec::clear ( )
inline
bool fei::CSVec::operator== ( const CSVec rhs) const
inline

Definition at line 40 of file fei_CSVec.hpp.

References coefs_, and indices_.

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

Definition at line 44 of file fei_CSVec.hpp.

References coefs_, and indices_.

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

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

Definition at line 51 of file fei_CSVec.hpp.

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

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

Definition at line 52 of file fei_CSVec.hpp.

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


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