class Table

Data type Table

Inheritance:


Public Methods

Table(int dim, int connections_per_row = 3)
Creates table with fixed number of connections.
Table(int dim, const int *connections_per_row)
Creates table with variable number of connections.
void SetSize(int dim, int connections_per_row)
Set the size and the number of connections for the table.
inline int Size() const
Returns the number of TYPE I elements.
inline int Size_of_connections() const
Returns the number of connections in the table
int operator) (int i, int j) const
Returns index of the connection between element i of TYPE I and element j of TYPE II
void GetRow(int i, Array<int> &row) const
Return row i in array row.
int Push( int i, int j )
Establish connection between element i and element j in the table
void Finalize()
Finalize the table initialization
void Print(ostream & out = cout, int width = 4)
Prints the table to stream out.
~Table()
Destroys Table.

Protected Fields

int size
size is the number of TYPE I elements.
int* I
Arrays for the connectivity information in the CSR storage

Documentation

Data type Table. Table stores the connectivity of elements of TYPE I to elements of TYPE II, for example, it may be Element-To-Face connectivity table, etc. *
int size
size is the number of TYPE I elements.

int* I
Arrays for the connectivity information in the CSR storage. I is of size "size+1", J is of size the number of connections between TYPE I to TYPE II elements (actually stored I[size]). *

Table(int dim, int connections_per_row = 3)
Creates table with fixed number of connections.

Table(int dim, const int *connections_per_row)
Creates table with variable number of connections.

void SetSize(int dim, int connections_per_row)
Set the size and the number of connections for the table.

inline int Size() const
Returns the number of TYPE I elements.

inline int Size_of_connections() const
Returns the number of connections in the table. If Finalize() is not called, it returns the number of possible connections established by the used constructor. Otherwise, it is exactly the number of established connections before calling Finalize(). *

int operator) (int i, int j) const
Returns index of the connection between element i of TYPE I and element j of TYPE II. If there is no connection between element i and element j established in the table, then the return value is -1. *

void GetRow(int i, Array<int> &row) const
Return row i in array row.

int Push( int i, int j )
Establish connection between element i and element j in the table. The return value is the index of the connection. It returns -1 if it fails to establish the connection. Possibilities are there is not enough memory on row i to establish connection to j, an attempt to establish new connection after calling Finalize(). *

void Finalize()
Finalize the table initialization. The function may be called only once, after the table has been initialized, in order to densen array J (by getting rid of -1's in array J). Calling this function will "freeze" the table and function Push will work no more. Note: The table is functional even without calling Finalize(). *

void Print(ostream & out = cout, int width = 4)
Prints the table to stream out.

~Table()
Destroys Table.


Direct child classes:
STable

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de