NGSolve
4.9
|
A dynamic table class. More...
#include <table.hpp>
Public Types | |
typedef const FlatArray< T > | ConstFlatArray |
Public Member Functions | |
DynamicTable (int size=0) | |
Creates table of size size. | |
DynamicTable (const Array< int > &entrysizes) | |
Creates table with a priori fixed entry sizes. | |
void | Add (int i, const T &acont) |
Inserts element acont into row i. Does not test if already used. | |
void | AddUnique (int i, const T &cont) |
Inserts element acont into row i, iff not yet exists. | |
void | AddEmpty (int i) |
Inserts element acont into row i. Does not test if already used. | |
void | Set (int i, int nr, const T &acont) |
Set the nr-th element in the i-th row to acont. | |
const T & | Get (int i, int nr) const |
Returns the nr-th element in the i-th row. | |
const T * | GetLine (int i) const |
Returns pointer to the first element in row i. | |
int | Size () const |
Returns size of the table. | |
int | EntrySize (int i) const |
Returns size of the i-th row. | |
void | DecEntrySize (int i) |
FlatArray< T > | operator[] (int i) |
Access entry i. | |
ConstFlatArray | operator[] (int i) const |
Access entry i. |
A dynamic table class.
A DynamicTable contains entries of variable size. Entry sizes can be increased dynamically.
const T& ngstd::DynamicTable< T >::Get | ( | int | i, |
int | nr | ||
) | const [inline] |
Returns the nr-th element in the i-th row.
Does not check for overflow.
const T* ngstd::DynamicTable< T >::GetLine | ( | int | i | ) | const [inline] |
Returns pointer to the first element in row i.
void ngstd::DynamicTable< T >::Set | ( | int | i, |
int | nr, | ||
const T & | acont | ||
) | [inline] |
Set the nr-th element in the i-th row to acont.
Does not check for overflow.