|
ergo
|
A way to store sparse matrix patterns. More...
#include <sparse_pattern.h>
Classes | |
| struct | Column |
| struct | Interval |
| ranges are upper-exclusive: involve i: lo <= i < hi. More... | |
Public Types | |
| typedef std::vector< Interval > | IntervalList |
Public Member Functions | |
| SparsePattern (const BasisInfoStruct &bis_) | |
| ~SparsePattern () | |
| void | add (int nRanges, const int(*range)[2]) |
| marks specified ranges as used. More... | |
| void | save (FILE *f) const |
| Save itself to the specified stream. More... | |
| void | load (FILE *f) |
| Load itself from the specified stream. More... | |
| const Column & | operator[] (int column) const |
| int | getColumnSize (int col) const |
| returns the number of stored elements for specified column. More... | |
| int | size () const |
| Returns the dimension of the pattern. More... | |
| int | sizeTotal () const |
| returns the total number of nonzero elements. More... | |
Private Attributes | |
| const BasisInfoStruct & | bis |
| Column * | ranges |
A way to store sparse matrix patterns.
| typedef std::vector<Interval> SparsePattern::IntervalList |
|
inlineexplicit |
|
inline |
| void SparsePattern::add | ( | int | nRanges, |
| const int(*) | range[2] | ||
| ) |
marks specified ranges as used.
References SparsePattern::Column::addInterval(), SparsePattern::Column::addIntervals(), bis, ergoShellsToOrbs(), and ranges.
|
inline |
returns the number of stored elements for specified column.
References SparsePattern::Column::size().
Referenced by load(), save(), sizeTotal(), and SparseMatrix::SparseMatrix().
| void SparsePattern::load | ( | FILE * | f | ) |
Load itself from the specified stream.
References bis, getColumnSize(), SparsePattern::Column::list, BasisInfoStruct::noOfBasisFuncs, and ranges.
|
inline |
| void SparsePattern::save | ( | FILE * | f | ) | const |
Save itself to the specified stream.
References bis, do_output(), getColumnSize(), SparsePattern::Column::list, LOG_AREA_DFT, LOG_CAT_INFO, BasisInfoStruct::noOfBasisFuncs, and ranges.
|
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, getColumnSize(), and BasisInfoStruct::noOfBasisFuncs.
|
private |
Referenced by add(), load(), save(), and sizeTotal().