#include <array.h>
Inheritance diagram for Array< T >:


Public Member Functions | |
| Array (long nbOfRows, long nbOfColumns) | |
| void | setSize (long nbOfRows, long nbOfColumns) |
| T | operator() (long row, long column) const |
Accessor Array(i,j). | |
| T & | operator() (long row, long column) |
Mutator Array(i,j). | |
| T & | operator[] (long position) |
| Return the i element of the internal array by reference. | |
| long | nbOfRows () const |
| Returns the number of rows in the array. | |
| long | nbOfColumns () const |
| Returns the number of columns in the array. | |
| void | copyAndPrependColumn (Array &source) |
Copies data from source to the current object prepending an empty column. | |
| void | copySubset (Array &source, long lastColumnToCopy) |
Copies a subset of data from source to the current object. | |
| void | copySubset (Array &source, long firstColumnToCopy, long lastColumnToCopy, long startingColumn) |
Copies a subset of data from source to the current object. | |
| void | fillWithZeros () |
| Fills the array with zeros. | |
| Array< T > & | operator= (const Array< T > &source) |
| Overloading of the operator=. | |
| Array (long nbOfRows, long nbOfColumns) | |
| void | setSize (long nbOfRows, long nbOfColumns) |
| T | operator() (long row, long column) const |
Accessor Array(i,j). | |
| T & | operator() (long row, long column) |
Mutator Array(i,j). | |
| T & | operator[] (long position) |
| Return the i element of the internal array by reference. | |
| long | nbOfRows () const |
| Returns the number of rows in the array. | |
| long | nbOfColumns () const |
| Returns the number of columns in the array. | |
| void | copyAndPrependColumn (Array &source) |
Copies data from source to the current object prepending an empty column. | |
| void | copySubset (Array &source, long lastColumnToCopy) |
Copies a subset of data from source to the current object. | |
| void | copySubset (Array &source, long firstColumnToCopy, long lastColumnToCopy, long startingColumn) |
Copies a subset of data from source to the current object. | |
| void | fillWithZeros () |
| Fills the array with zeros. | |
| Array< T > & | operator= (const Array< T > &source) |
| Overloading of the operator=. | |
Protected Attributes | |
| long | nbColumns |
| Number of columns in the array. | |
| long | nbRows |
| Number of rows in the array. | |
| T * | array |
| T * | array |
Array stores the array elements directly in the array. It can only deal with simple types. Array provides an easy way to acess the elements through the parenthesis operator.
| T Array< T >::operator() | ( | long | row, | |
| long | column | |||
| ) | const [inline] |
Accessor Array(i,j).
The rows and columns starts at 1.
| row | index | |
| column | index |
| T& Array< T >::operator() | ( | long | row, | |
| long | column | |||
| ) | [inline] |
Mutator Array(i,j).
The rows and columns starts at 1.
| row | index | |
| column | index |
| T& Array< T >::operator[] | ( | long | position | ) | [inline] |
Return the i element of the internal array by reference.
The position starts at 0.
| position | index |
| long Array< T >::nbOfRows | ( | ) | const [inline] |
Returns the number of rows in the array.
| long Array< T >::nbOfColumns | ( | ) | const [inline] |
Returns the number of columns in the array.
| void Array< T >::copySubset | ( | Array< T > & | source, | |
| long | firstColumnToCopy, | |||
| long | lastColumnToCopy, | |||
| long | startingColumn | |||
| ) | [inline] |
Copies a subset of data from source to the current object.
Copy from firstColumnToCopy to the lastColumnToCopy inserting them after startingColumn. Assumes that the Array has the correct size.
| T Array< T >::operator() | ( | long | row, | |
| long | column | |||
| ) | const [inline] |
Accessor Array(i,j).
The rows and columns starts at 1.
| row | index | |
| column | index |
| T& Array< T >::operator() | ( | long | row, | |
| long | column | |||
| ) | [inline] |
Mutator Array(i,j).
The rows and columns starts at 1.
| row | index | |
| column | index |
| T& Array< T >::operator[] | ( | long | position | ) | [inline] |
Return the i element of the internal array by reference.
The position starts at 0.
| position | index |
| long Array< T >::nbOfRows | ( | ) | const [inline] |
Returns the number of rows in the array.
| long Array< T >::nbOfColumns | ( | ) | const [inline] |
Returns the number of columns in the array.
| void Array< T >::copySubset | ( | Array< T > & | source, | |
| long | firstColumnToCopy, | |||
| long | lastColumnToCopy, | |||
| long | startingColumn | |||
| ) | [inline] |
Copies a subset of data from source to the current object.
Copy from firstColumnToCopy to the lastColumnToCopy inserting them after startingColumn. Assumes that the Array has the correct size.
1.5.1