#include <rtcArray2.h>
Public Member Functions | |
Array2 () | |
Array2 (int rows, int columns) | |
Array2 (int rows, int columns, const T *d) | |
Array2 (int rows, int columns, const T a) | |
Array2 (const Array< T, 2 > &a) | |
T & | at (int rows, int columns) |
const T & | at (int rows, int columns) const |
int | columns () const |
int | indexOf (int rows, int columns) const |
T & | operator() (int rows, int columns) |
T | operator() (int rows, int columns) const |
int | rows () const |
void | setSize (int rows, int cols) |
A 2-Dimensional Array
Definition at line 39 of file rtcArray2.h.
rtc::Array2< T >::Array2 | ( | ) | [inline] |
Ctor that does no initalization.
Definition at line 93 of file rtcArray2.h.
rtc::Array2< T >::Array2 | ( | int | rows, |
int | columns | ||
) | [inline] |
Ctor that starts with given dimensions
rows | is the number of rows of a two-dimensional array |
columns | is the number of columns of a two-dimensional array |
Definition at line 100 of file rtcArray2.h.
rtc::Array2< T >::Array2 | ( | int | rows, |
int | columns, | ||
const T * | d | ||
) | [inline] |
Ctor that initializes elements from an array.
rows | is the number of rows of a two-dimensional array |
columns | is the number of columns of a two-dimensional array |
d | pointer to the initalization array |
Definition at line 110 of file rtcArray2.h.
rtc::Array2< T >::Array2 | ( | int | rows, |
int | columns, | ||
const T | a | ||
) | [inline] |
Ctor that initializes all elements from a scalar.
rows | is the number of rows of a two-dimensional array |
columns | is the number of columns of a two-dimensional array |
a | the value to assign to all elements |
Definition at line 121 of file rtcArray2.h.
rtc::Array2< T >::Array2 | ( | const Array< T, 2 > & | a | ) | [inline] |
Ctor that initializes an Array2<T> with a Array<T,2>.
a | is the array to duplicate |
Definition at line 130 of file rtcArray2.h.
T & rtc::Array2< T >::at | ( | int | row, |
int | column | ||
) | [inline] |
Returns mutable reference to array element
row | is the row index |
column | is the column index |
Definition at line 150 of file rtcArray2.h.
const T & rtc::Array2< T >::at | ( | int | row, |
int | column | ||
) | const [inline] |
Returns mutable reference to array element
row | is the row index |
column | is the column index |
Definition at line 160 of file rtcArray2.h.
int rtc::Array2< T >::columns | ( | ) | const [inline] |
Returns the number of columns
Definition at line 196 of file rtcArray2.h.
int rtc::Array2< T >::indexOf | ( | int | row, |
int | column | ||
) | const [inline] |
Returns linear index of given array indices
row | is the row index |
column | is the column index |
Definition at line 208 of file rtcArray2.h.
T & rtc::Array2< T >::operator() | ( | int | row, |
int | column | ||
) | [inline] |
Returns mutable reference to array element
row | is the row index |
column | is the column index |
Definition at line 170 of file rtcArray2.h.
T rtc::Array2< T >::operator() | ( | int | row, |
int | column | ||
) | const [inline] |
Returns array element
row | is the row index |
column | is the column index |
Definition at line 180 of file rtcArray2.h.
int rtc::Array2< T >::rows | ( | ) | const [inline] |
void rtc::Array2< T >::setSize | ( | int | rows, |
int | columns | ||
) | [inline] |
Set the size of the array
rows | is the number of rows of a two-dimensional array |
columns | is the number of columns of a two-dimensional array |
Definition at line 140 of file rtcArray2.h.