#include <Simple2DArray.h>
Inheritance diagram for Simple2DArray::

Public Methods | |
| Simple2DArray () | |
| Null constructor. | |
| Simple2DArray (const BasicArray< T > &array, const size_type nrows=1, const EnumDataOwned own=DataNotOwned) | |
| Constructor that initializes the 2D array using a given array. More... | |
| Simple2DArray (const size_type nrows, const size_type ncols, T *d=((T *) 0), const EnumDataOwned own=DataNotOwned) | |
| Constructor that initializes the 2D array using a given array. More... | |
| Simple2DArray (const size_type nrows, const size_type ncols, const BasicArray< T > &array, const EnumDataOwned own=DataNotOwned) | |
| Constructor that initializes the 2D array using a given array. More... | |
| Simple2DArray (const Simple2DArray< T > &array) | |
| Copy constructor. | |
| Simple2DArray< T > & | operator= (const Simple2DArray< T > &array) |
| Copies the array object by constructing a new Simple2DArray. | |
| Simple2DArray< T > & | operator= (const T &val) |
| Set all elements of the array to val. | |
| int | operator== (const Simple2DArray< T > &array) const |
| Checks to see if the current array equals array. | |
| int | operator!= (const Simple2DArray< T > &array) const |
| Checks to see if the current array does not equal array. | |
| int | compare (const Simple2DArray< T > &array) const |
| Compares the current array with array. More... | |
| virtual int | write (ostream &output) const |
| Write the array to the output stream. More... | |
| virtual int | read (istream &input) |
| Read the array from the input stream. | |
| virtual int | write (PackBuffer &output) const |
| Pack the array into a PackBuffer class. | |
| virtual int | read (UnPackBuffer &input) |
| Unpack the array from an UnPackBuffer class. | |
The Simple2DArray class extends the Basic2DArray class to include I/O operations and comparison methods.
|
||||||||||||||||||||
|
Constructor that initializes the 2D array using a given array.
The 2D array only constructs the array of pointers, which point into the data owned by the |
|
||||||||||||||||||||||||
|
Constructor that initializes the 2D array using a given array.
The 2D array only constructs the array of pointers, which point into the data owned by the |
|
||||||||||||||||||||||||
|
Constructor that initializes the 2D array using a given array.
The 2D array only constructs the array of pointers, which point into the data owned by the |
|
||||||||||
|
Compares the current array with array. If the current array is longer, then returns 1. If shorter, then returns -1. Otherwise, does a pairwise comparison on elements of both arrays. If there exists a nonequal pair of elements, then returns 1 if the current array is greater and -1 otherwise. |
|
||||||||||
|
Write the array to the output stream. The format for this output is <nrows> <ncols> <elt-1,1> <elt-1,2> ... <elt-1,m> ... <elt-n,m> |