template
class
FArray2D<class,int,int>
(Return to index)
A templated representation for 2-dimensional arrays.
This version has fixed dimensions. It implements storage management
and access, but contains no arithmetic operations.
The destructor generated by the compiler performs the correct operation.
For speed reasons it is not implemented.
Type: |
Instantiable |
Include file: |
./FixedAlgebra/FArray2D.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
-
typedef T value_type
;
-
typedef T* iterator
;
-
typedef const T* const_iterator
;
-
typedef T* row_iterator
;
-
typedef const T* const_row_iterator
;
-
typedef FSlice<T,N> col_iterator
;
-
typedef FConstSlice<T,N> const_col_iterator
;
-
FArray2D
()
;
-
FArray2D
(const T&)
;
-
FArray2D
(const FArray2D&)
;
-
const FArray2D<T,M,N>& operator=
(const FArray2D<T,M,N>&)
;
-
T& operator()
(int,int)
;
-
const T& operator()
(int,int)const
;
-
int nrows
()const
;
-
int ncols
()const
;
-
int size
()const
;
-
iterator begin
()
;
-
iterator end
()
;
-
const_iterator begin
()const
;
-
const_iterator end
()const
;
-
row_iterator row_begin
(int)
;
-
row_iterator row_end
(int)
;
-
const_row_iterator row_begin
(int)const
;
-
const_row_iterator row_end
(int)const
;
-
row_iterator operator[]
(int)
;
-
const_row_iterator operator[]
(int)const
;
-
col_iterator col_begin
(int)
;
-
col_iterator col_end
(int)
;
-
const_col_iterator col_begin
(int)const
;
-
const_col_iterator col_end
(int)const
;
-
void getColumn
(FArray1D<T,M>&,int)const
;
-
void getRow
(FArray1D<T,N>&,int)const
;
-
void putColumn
(const FArray1D<T,M>&,int)
;
-
void putRow
(const FArray1D<T,N>&,int)
;
-
void swapColumns
(int,int)
;
-
void swapRows
(int,int)
;
- Protected Members:
-
T data
;
-
static const int SIZE
;
Documentation:
- Public members:
-
FArray2D
()
;
- Default constructor.
Constructs zero array.
-
FArray2D
(const T&)
;
- Constructor.
Set all array elements to t.
-
FArray2D
(const FArray2D&)
;
- Copy constructor.
-
iterator begin
()
;
- Get beginning of data.
The array is interpreted as a one-dimensional array.
Version for non-constant array.
-
const_iterator begin
()const
;
- Get beginning of data.
The array is interpreted as a one-dimensional array.
Version for constant array.
-
col_iterator col_begin
(int)
;
- Get column iterator.
Return pointer to beginning of column c.
Throw RangeError if c is out of range.
-
const_col_iterator col_begin
(int)const
;
- Get column iterator.
Return pointer to beginning of column c.
Throw RangeError if c is out of range.
-
col_iterator col_end
(int)
;
- Get column iterator.
Return pointer past end of column c.
Throw RangeError if c is out of range.
-
const_col_iterator col_end
(int)const
;
- Get column iterator.
Return pointer past end of column c.
Throw RangeError if c is out of range.
-
typedef FSlice<T,N> col_iterator
;
- Iterator for access by columns.
-
typedef FConstSlice<T,N> const_col_iterator
;
- Iterator for access by columns.
-
typedef const T* const_iterator
;
- Iterator for constant array.
-
typedef const T* const_row_iterator
;
- Iterator for access by rows.
-
iterator end
()
;
- Get pointer past end of data.
The array is interpreted as a one-dimensional array.
Version for non-constant array.
-
const_iterator end
()const
;
- Get pointer past end of data.
The array is interpreted as a one-dimensional array.
Version for constant array.
-
void getColumn
(FArray1D<T,M>&,int)const
;
- Fetch column.
Copy column c into toArray.
Throw RangeError if c is out of range.
-
void getRow
(FArray1D<T,N>&,int)const
;
- Fetch row.
Copy row r into toArray.
-
typedef T* iterator
;
- Iterator for the array.
-
int ncols
()const
;
- Get number of columns.
-
int nrows
()const
;
- Get number of rows.
-
T& operator()
(int,int)
;
- Get element.
Return a reference to the element in row r and column c.
-
const T& operator()
(int,int)const
;
- Get element.
Return a constant reference to the element in row r and
column c.
-
const FArray2D<T,M,N>& operator=
(const FArray2D<T,M,N>&)
;
- Assignment.
-
row_iterator operator[]
(int)
;
- Get row iterator.
Return pointer to beginning of row r.
Result is undefined, if r is out of range.
-
const_row_iterator operator[]
(int)const
;
- Get row iterator.
Return pointer to beginning of row r.
Result is undefined, if r is out of range.
-
void putColumn
(const FArray1D<T,M>&,int)
;
- Store column.
Copy fromArray to column c.
Throw RangeError if c is out of range.
-
void putRow
(const FArray1D<T,N>&,int)
;
- Store row.
Copy fromArray to row r.
Throw RangeError if r is out of range.
-
row_iterator row_begin
(int)
;
- Get row iterator.
Return pointer to beginning of row r.
Throw RangeError, if r is out of range.
-
const_row_iterator row_begin
(int)const
;
- Get row iterator.
Return pointer to beginning of constant row r.
Throw RangeError, if r is out of range.
-
row_iterator row_end
(int)
;
- Get row iterator.
Return pointer past end of row r.
Throw RangeError, if r is out of range.
-
const_row_iterator row_end
(int)const
;
- Get row iterator.
Return pointer past end of constant row r.
Throw RangeError, if r is out of range.
-
typedef T* row_iterator
;
- Iterator for access by rows.
-
int size
()const
;
- Get total size.
-
void swapColumns
(int,int)
;
- Exchange columns.
Exchange columns c1 and c2.
Throw RangeError, if either index is out of range.
-
void swapRows
(int,int)
;
- Exchange rows.
Exchange rows r1 and r2.
Throw RangeError, if either index is out of range.
-
typedef T value_type
;
- The value type of the array.
- Protected members:
Documentation generated by fci on Mon Feb 7 11:41:38 2000