![]() |
MFEM v4.7.0
Finite element discretization library
|
Dynamic 2D array using row-major layout. More...
#include <array.hpp>
Public Member Functions | |
Array2D () | |
Array2D (int m, int n) | |
Array2D (const Array2D &)=default | |
void | SetSize (int m, int n) |
int | NumRows () const |
int | NumCols () const |
const T & | operator() (int i, int j) const |
T & | operator() (int i, int j) |
const T * | operator[] (int i) const |
T * | operator[] (int i) |
const T * | operator() (int i) const |
T * | operator() (int i) |
const T * | GetRow (int i) const |
T * | GetRow (int i) |
void | GetRow (int i, Array< T > &sa) const |
Extract a copy of the i-th row into the Array sa. | |
void | Save (std::ostream &os, int fmt=0) const |
Save the Array2D to the stream out using the format fmt. The format fmt can be: | |
void | Load (std::istream &in, int fmt=0) |
Read an Array2D from the stream in using format fmt. The format fmt can be: | |
void | Load (const char *filename, int fmt=0) |
Read an Array2D from a file. | |
void | Load (int new_size0, int new_size1, std::istream &in) |
Set the Array2D dimensions to new_size0 x new_size1 and read that many entries from the stream in. | |
void | Copy (Array2D ©) const |
void | operator= (const T &a) |
Array2D & | operator= (const Array2D &a)=default |
void | MakeRef (const Array2D &master) |
Make this Array a reference to 'master'. | |
void | DeleteAll () |
Delete all dynamically allocated memory, resetting all dimensions to zero. | |
void | Print (std::ostream &out=mfem::out, int width=4) |
Prints array to stream with width elements per row. | |
Friends | |
void | Swap (Array2D< T > &a, Array2D< T > &b) |
Dynamic 2D array using row-major layout.
|
inline |
|
inline |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void mfem::Array2D< T >::Load | ( | const char * | filename, |
int | fmt = 0 ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinedefault |
|
inline |
|
inline |
|
inline |
void mfem::Array2D< T >::Print | ( | std::ostream & | out = mfem::out, |
int | width = 4 ) |
|
inline |
|
inline |