#include <barray2d.hh>
Inheritance diagram for PLib::Basic2DArray::
Public Methods | |
int | rows () const |
int | cols () const |
Basic2DArray () | |
Basic2DArray (const int r, const int c) | |
Basic2DArray (const Basic2DArray< T > &f2) | |
Basic2DArray (T *p, const int r, const int c) | |
virtual | ~Basic2DArray () |
Basic2DArray< T > & | operator= (const Basic2DArray< T > &f2) |
void | resize (const int nr, const int nc) |
void | resize (const Basic2DArray< T > &A) |
void | resizeKeep (const int nr, const int nc) |
void | reset (const T val=0.0) |
T | operator= (const T val) |
T * | operator[] (const int i) |
T * | operator[] (const int i) const |
T & | operator() (const int i, const int j) |
T | operator() (const int i, const int j) const |
void | io_elem_width (int w) |
void | io_by_rows () |
void | io_by_columns () |
ostream & | print (ostream &os) const |
T & | elem (const int i, const int j) |
T | elem (const int i, const int j) const |
Protected Methods | |
void | init (const int r=1, const int c=1) |
Protected Attributes | |
int | by_columns |
int | width |
int | rz |
int | cz |
T * | m |
T ** | vm |
int | created |
Friends | |
istream & | operator>> (istream &is, Basic2DArray< T > &ary) |
ostream & | operator<< (ostream &os, const Basic2DArray< T > &ary) |
This is a basis array class for two dimensionnal storage and retrieval.
|
constructor.
Constructs an array of size (0,0).
|
|
constructor with the size specified.
Constructs an array of size (r,c).
|
|
copy constructor.
Copy constructor
|
|
constructor from memory.
Constructs a matrix from memory. No memory is allocated for this new basic2DArray and the memory will not be deallocated when the destructor is called. You are responsible for cleaning up the memory you allocated.
|
|
destructor.
Destructor
|
|
|
|
|
|
|
|
|
|
assignment operator.
Assignment operator
|
|
|
|
writes a 2D array to an ostream Writes a matrix to an ostream.
|
|
reset all values of the 2D array to v.
Reset all values of the 2D array to v
|
|
a destructive resize of the matrix dimensions.
Changes the matrix dimensions and intialize it to 0.
Reimplemented in PLib::LUMatrix. |
|
writes a 2D array to an ostream.
|
|
reads a 2D arra from an istream.
Reads a matrix from an istream
|