NGSolve  5.3
Public Member Functions
ngstd::DynamicTable< T > Class Template Reference

A dynamic table class. More...

#include <table.hpp>

Inheritance diagram for ngstd::DynamicTable< T >:
Inheritance graph
[legend]
Collaboration diagram for ngstd::DynamicTable< T >:
Collaboration graph
[legend]

List of all members.

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.
FlatArray< T > operator[] (int i) const

Detailed Description

template<class T>
class ngstd::DynamicTable< T >

A dynamic table class.

A DynamicTable contains entries of variable size. Entry sizes can be increased dynamically.


Member Function Documentation

template<class T>
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.

template<class T>
const T* ngstd::DynamicTable< T >::GetLine ( int  i) const [inline]

Returns pointer to the first element in row i.

template<class T>
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.


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