ergo
SparsePattern Class Reference

A way to store sparse matrix patterns. More...

#include <sparse_pattern.h>

List of all members.

Classes

struct  Column
struct  Interval
 ranges are upper-exclusive: involve i: lo <= i < hi. More...

Public Types

typedef std::vector< IntervalIntervalList

Public Member Functions

 SparsePattern (const BasisInfoStruct &bis_)
 ~SparsePattern ()
void add (int nRanges, const int(*range)[2])
 marks specified ranges as used.
void save (FILE *f) const
 Save itself to the specified stream.
void load (FILE *f)
 Load itself from the specified stream.
const Columnoperator[] (int column) const
int getColumnSize (int col) const
 returns the number of stored elements for specified column.
int size () const
 Returns the dimension of the pattern.
int sizeTotal () const
 returns the total number of nonzero elements.

Private Attributes

const BasisInfoStructbis
Columnranges

Detailed Description

A way to store sparse matrix patterns.


Member Typedef Documentation

typedef std::vector<Interval> SparsePattern::IntervalList

Constructor & Destructor Documentation

SparsePattern::SparsePattern ( const BasisInfoStruct bis_) [inline, explicit]
SparsePattern::~SparsePattern ( ) [inline]

Member Function Documentation

void SparsePattern::add ( int  nRanges,
const int(*)  range[2] 
)
int SparsePattern::getColumnSize ( int  col) const [inline]

returns the number of stored elements for specified column.

References SparsePattern::Column::size().

Referenced by SparseMatrix::SparseMatrix(), load(), save(), and sizeTotal().

void SparsePattern::load ( FILE *  f)

Load itself from the specified stream.

References bis, BasisInfoStruct::noOfBasisFuncs, ranges, SparsePattern::Column::list, and getColumnSize().

const Column& SparsePattern::operator[] ( int  column) const [inline]
void SparsePattern::save ( FILE *  f) const
int SparsePattern::size ( ) const [inline]

Returns the dimension of the pattern.

Auxiliary function.

References BasisInfoStruct::noOfBasisFuncs.

Referenced by SparseMatrix::createOffsets().

int SparsePattern::sizeTotal ( ) const

returns the total number of nonzero elements.

References bis, BasisInfoStruct::noOfBasisFuncs, and getColumnSize().


Member Data Documentation

Referenced by add(), load(), save(), and sizeTotal().

Referenced by add(), load(), and save().


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