43 explicit Table (
int dim,
int connections_per_row = 3);
47 Table (
int nrows,
int *partitioning);
50 void MakeI (
int nrows);
59 void SetSize(
int dim,
int connections_per_row);
63 void SetDims(
int rows,
int nnz);
84 const int *
GetRow(
int i)
const {
return J+
I[i]; }
89 const int *
GetI()
const {
return I; };
90 const int *
GetJ()
const {
return J; };
92 void SetIJ(
int *newI,
int *newJ,
int newsize = -1);
99 int Push(
int i,
int j );
115 void Print(std::ostream & out = std::cout,
int width = 4)
const;
118 void Save(std::ostream & out)
const;
129 void Transpose (
const Table &A, Table &At,
int _ncols_A = -1);
133 void Transpose(
const Array<int> &A, Table &At,
int _ncols_A = -1);
136 void Mult (
const Table &A,
const Table &B, Table &C);
137 Table *
Mult (
const Table &A,
const Table &B);
148 STable (
int dim,
int connections_per_row = 3);
160 int Push(
int i,
int j );
177 int NumRows, NumEntries;
179 #ifdef MFEM_USE_MEMALLOC
183 int Push_(
int r,
int c);
184 int Index(
int r,
int c)
const;
191 {
return((a <= b) ? Push_(a, b) : Push_(b, a)); }
193 {
return((a <= b) ? Index(a, b) : Index(b, a)); }
void SetSize(int dim, int connections_per_row)
Set the size and the number of connections for the table.
void AddColumnsInRow(int r, int ncol)
int operator()(int i, int j) const
void MakeI(int nrows)
Next 7 methods are used together with the default constructor.
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
void SetDims(int rows, int nnz)
void GetRow(int i, Array< int > &row) const
Return row i in array row (the Table must be finalized)
void Save(std::ostream &out) const
void LoseData()
Call this if data has been stolen.
int Size_of_connections() const
RowIterator(const DSTable &t, int r)
void AddConnections(int r, const int *c, int nc)
int Width() const
Returns the number of TYPE II elements (after Finalize() is called).
void Print(std::ostream &out=std::cout, int width=4) const
Prints the table to stream out.
int operator()(int i, int j) const
void AddConnection(int r, int c)
void Transpose(const Table &A, Table &At, int _ncols_A)
Transpose a Table.
int Size() const
Returns the number of TYPE I elements.
void PrintMatlab(std::ostream &out) const
STable(int dim, int connections_per_row=3)
Creates table with fixed number of connections.
int size
size is the number of TYPE I elements.
void AddAColumnInRow(int r)
void SetIJ(int *newI, int *newJ, int newsize=-1)
const int * GetRow(int i) const
~STable()
Destroys STable.
int operator()(int a, int b) const
int NumberOfEntries() const
void Copy(Table ©) const
Table()
Creates an empty table.