$search

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 (const Array< T, 2 > &a)
 Array2 (int rows, int columns, const T a)
 Array2 (int rows, int columns, const T *d)
 Array2 (int rows, int columns)
 Array2 ()
const T & at (int rows, int columns) const
T & at (int rows, int columns)
int columns () const
int indexOf (int rows, int columns) const
operator() (int rows, int columns) const
T & operator() (int rows, int columns)
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:
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.

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

Ctor that initializes elements from an array.

Parameters:
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.

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

Ctor that initializes all elements from a scalar.

Parameters:
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.

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:
a is the array to duplicate

Definition at line 130 of file rtcArray2.h.


Member Function Documentation

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

Returns mutable reference to array element

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

Definition at line 160 of file rtcArray2.h.

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

Returns mutable reference to array element

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

Definition at line 150 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:
row is the row index
column is 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 
) const [inline]

Returns array element

Parameters:
row is the row index
column is the column index
Returns:
array element

Definition at line 180 of file rtcArray2.h.

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

Returns mutable reference to array element

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

Definition at line 170 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:
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtc
Author(s): Benjamin Pitzer
autogenerated on Sun Mar 3 11:08:31 2013