Public Member Functions
rtc::Array2< T > Class Template Reference

#include <rtcArray2.h>

Inheritance diagram for rtc::Array2< T >:
Inheritance graph
[legend]

List of all members.

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)
operator() (int rows, int columns) const
int rows () const
void setSize (int rows, int cols)

Detailed Description

template<class T>
class rtc::Array2< T >

A 2-Dimensional Array

Definition at line 39 of file rtcArray2.h.


Constructor & Destructor Documentation

template<class T >
rtc::Array2< T >::Array2 ( ) [inline]

Ctor that does no initalization.

Definition at line 93 of file rtcArray2.h.

template<class T >
rtc::Array2< T >::Array2 ( int  rows,
int  columns 
) [inline]

Ctor that starts with given dimensions

Parameters:
rowsis the number of rows of a two-dimensional array
columnsis the number of columns of a two-dimensional array

Definition at line 100 of file rtcArray2.h.

template<class T>
rtc::Array2< T >::Array2 ( int  rows,
int  columns,
const T *  d 
) [inline]

Ctor that initializes elements from an array.

Parameters:
rowsis the number of rows of a two-dimensional array
columnsis the number of columns of a two-dimensional array
dpointer to the initalization array

Definition at line 110 of file rtcArray2.h.

template<class T>
rtc::Array2< T >::Array2 ( int  rows,
int  columns,
const T  a 
) [inline]

Ctor that initializes all elements from a scalar.

Parameters:
rowsis the number of rows of a two-dimensional array
columnsis the number of columns of a two-dimensional array
athe value to assign to all elements

Definition at line 121 of file rtcArray2.h.

template<class T>
rtc::Array2< T >::Array2 ( const Array< T, 2 > &  a) [inline]

Ctor that initializes an Array2<T> with a Array<T,2>.

Parameters:
ais the array to duplicate

Definition at line 130 of file rtcArray2.h.


Member Function Documentation

template<class T >
T & rtc::Array2< T >::at ( int  row,
int  column 
) [inline]

Returns mutable reference to array element

Parameters:
rowis the row index
columnis the column index
Returns:
a reference to the array element

Definition at line 150 of file rtcArray2.h.

template<class T >
const T & rtc::Array2< T >::at ( int  row,
int  column 
) const [inline]

Returns mutable reference to array element

Parameters:
rowis the row index
columnis the column index
Returns:
a reference to the array element

Definition at line 160 of file rtcArray2.h.

template<class T >
int rtc::Array2< T >::columns ( ) const [inline]

Returns the number of columns

Returns:
the number of columns

Definition at line 196 of file rtcArray2.h.

template<class T >
int rtc::Array2< T >::indexOf ( int  row,
int  column 
) const [inline]

Returns linear index of given array indices

Parameters:
rowis the row index
columnis the column index
Returns:
the linear index in the data array x

Definition at line 208 of file rtcArray2.h.

template<class T >
T & rtc::Array2< T >::operator() ( int  row,
int  column 
) [inline]

Returns mutable reference to array element

Parameters:
rowis the row index
columnis the column index
Returns:
a reference to the array element

Definition at line 170 of file rtcArray2.h.

template<class T >
T rtc::Array2< T >::operator() ( int  row,
int  column 
) const [inline]

Returns array element

Parameters:
rowis the row index
columnis the column index
Returns:
array element

Definition at line 180 of file rtcArray2.h.

template<class T >
int rtc::Array2< T >::rows ( ) const [inline]

Returns the number of rows

Returns:
the number of rows

Definition at line 188 of file rtcArray2.h.

template<class T >
void rtc::Array2< T >::setSize ( int  rows,
int  columns 
) [inline]

Set the size of the array

Parameters:
rowsis the number of rows of a two-dimensional array
columnsis the number of columns of a two-dimensional array

Definition at line 140 of file rtcArray2.h.


The documentation for this class was generated from the following file:


rtc
Author(s): Benjamin Pitzer
autogenerated on Thu Jan 2 2014 11:04:54