#include <rtcArray.h>
Public Member Functions | |
void | addTo (const T *v, int i0=0, int vlen=-1) |
Array () | |
Array (const Vec< int, K > dim) | |
Array (const Array< T, K > &a) | |
T & | at (int i) |
T & | at (const Vec< int, K > ind) |
const T & | at (int i) const |
const T & | at (const Vec< int, K > ind) const |
void | deleteArray () |
bool | equalTo (const Array< T, K > &a) const |
int | indexOf (Vec< int, K > ind) const |
int | length () const |
T | operator() (int i) const |
T & | operator() (int i) |
T | operator() (const Vec< int, K > ind) const |
T & | operator() (const Vec< int, K > ind) |
Array< T, K > & | operator= (const Array< T, K > &a) |
T | operator[] (int i) const |
T & | operator[] (int i) |
T | operator[] (const Vec< int, K > ind) const |
T & | operator[] (const Vec< int, K > ind) |
bool | read (InputHandler &ih) |
void | reset () |
void | set (const T v) |
void | set (const T *v, int i0=0, int vlen=-1) |
void | set (const Array< T, K > &a) |
void | setSize (const Vec< int, K > dim_) |
Vec< int, K > | size () const |
int | size (int i) const |
bool | write (OutputHandler &oh) const |
~Array () | |
Public Attributes | |
T * | x |
storage array | |
Protected Attributes | |
Vec< int, K > | dim |
array dimensions | |
int | len |
linear length of array | |
Vec< int, K > | mul |
multipliers for computing linear index |
A K-Dimensional Array of type T
Definition at line 38 of file rtcArray.h.
rtc::Array< T, K >::Array | ( | ) | [inline] |
Ctor that does no initalization.
Definition at line 106 of file rtcArray.h.
rtc::Array< T, K >::Array | ( | const Vec< int, K > | dim_ | ) | [inline] |
Ctor that starts with given dimensions
dim_ | are the sizes in the several dimension |
Definition at line 117 of file rtcArray.h.
rtc::Array< T, K >::Array | ( | const Array< T, K > & | a | ) | [inline] |
rtc::Array< T, K >::~Array | ( | ) | [inline] |
Dtor that does no initalization.
Definition at line 140 of file rtcArray.h.
void rtc::Array< T, K >::addTo | ( | const T * | v, |
int | i0 = 0 , |
||
int | vlen = -1 |
||
) | [inline] |
Add the values in array v to this array
v | is the value to set the array to |
i0 | is offset where to start copying |
vlen | is the number of elements to copy |
Definition at line 217 of file rtcArray.h.
T & rtc::Array< T, K >::at | ( | int | i | ) | [inline] |
Returns mutable reference to array element
i | is the index list |
Definition at line 227 of file rtcArray.h.
T & rtc::Array< T, K >::at | ( | const Vec< int, K > | ind | ) | [inline] |
Returns mutable reference to array element
ind | is the index list |
Definition at line 236 of file rtcArray.h.
const T & rtc::Array< T, K >::at | ( | int | i | ) | const [inline] |
Returns mutable reference to array element
i | is the index list |
Definition at line 245 of file rtcArray.h.
const T & rtc::Array< T, K >::at | ( | const Vec< int, K > | ind | ) | const [inline] |
Returns mutable reference to array element
ind | is the index list |
Definition at line 254 of file rtcArray.h.
void rtc::Array< T, K >::deleteArray | ( | ) | [inline] |
Definition at line 47 of file rtcArray.h.
bool rtc::Array< T, K >::equalTo | ( | const Array< T, K > & | other | ) | const [inline] |
Compare the entire array to the passed array.
Definition at line 375 of file rtcArray.h.
int rtc::Array< T, K >::indexOf | ( | Vec< int, K > | ind | ) | const [inline] |
Returns linear index of given array indices
ind | is the vector of indices to be converted |
Definition at line 467 of file rtcArray.h.
int rtc::Array< T, K >::length | ( | ) | const [inline] |
Returns linear length of data
Reimplemented in rtc::VarMat< T >.
Definition at line 404 of file rtcArray.h.
T rtc::Array< T, K >::operator() | ( | int | i | ) | const [inline] |
Returns array element
i | is the linear index |
Definition at line 298 of file rtcArray.h.
T & rtc::Array< T, K >::operator() | ( | int | i | ) | [inline] |
Returns mutable reference to array element
i | is the linear index |
Definition at line 272 of file rtcArray.h.
T rtc::Array< T, K >::operator() | ( | const Vec< int, K > | ind | ) | const [inline] |
Returns array element
ind | is the index list |
Definition at line 289 of file rtcArray.h.
T & rtc::Array< T, K >::operator() | ( | const Vec< int, K > | ind | ) | [inline] |
Returns mutable reference to array element
ind | is the index list |
Definition at line 263 of file rtcArray.h.
Array< T, K > & rtc::Array< T, K >::operator= | ( | const Array< T, K > & | a | ) | [inline] |
Set this array equal to passed array
a | the array to replicate |
Definition at line 366 of file rtcArray.h.
T rtc::Array< T, K >::operator[] | ( | int | i | ) | const [inline] |
Returns array element
i | is the linear index |
Reimplemented in rtc::VarVec< T >.
Definition at line 350 of file rtcArray.h.
T & rtc::Array< T, K >::operator[] | ( | int | i | ) | [inline] |
Returns mutable reference to array element
i | is the linear index |
Reimplemented in rtc::VarVec< T >.
Definition at line 324 of file rtcArray.h.
T rtc::Array< T, K >::operator[] | ( | const Vec< int, K > | ind | ) | const [inline] |
Returns array element
ind | is the index list |
Definition at line 341 of file rtcArray.h.
T & rtc::Array< T, K >::operator[] | ( | const Vec< int, K > | ind | ) | [inline] |
Returns mutable reference to array element
ind | is the index list |
Definition at line 315 of file rtcArray.h.
bool rtc::Array< T, K >::read | ( | InputHandler & | ih | ) | [inline] |
Restore state from a binary stream.
Reimplemented in rtc::Image< T >, and rtc::Image< Vec3uc >.
Definition at line 422 of file rtcArray.h.
void rtc::Array< T, K >::reset | ( | ) | [inline] |
Deletes contents of array and frees memory
Definition at line 149 of file rtcArray.h.
void rtc::Array< T, K >::set | ( | const T | v | ) | [inline] |
Set the values of all the elements in the array to v
v | is the value to set the array to |
Reimplemented in rtc::VarVec< T >.
Definition at line 186 of file rtcArray.h.
void rtc::Array< T, K >::set | ( | const T * | v, |
int | i0 = 0 , |
||
int | vlen = -1 |
||
) | [inline] |
Set the values of all the elements in the array to v
v | is the value to set the array to |
i0 | is offset where to start copying |
vlen | is the number of elements to copy |
Definition at line 196 of file rtcArray.h.
void rtc::Array< T, K >::set | ( | const Array< T, K > & | a | ) | [inline] |
Set this array to the passed array, value-wise
a | is the array to duplicate |
Definition at line 205 of file rtcArray.h.
void rtc::Array< T, K >::setSize | ( | const Vec< int, K > | dim_ | ) | [inline] |
Set the size of the array
dim_ | the sizes of the array in each dimension |
Definition at line 163 of file rtcArray.h.
Vec< int, K > rtc::Array< T, K >::size | ( | ) | const [inline] |
Returns vector of array dimensions
Reimplemented in rtc::VarSMat< T >, rtc::Array1< T >, and rtc::Array1< Vec4< float > >.
Definition at line 388 of file rtcArray.h.
int rtc::Array< T, K >::size | ( | int | i | ) | const [inline] |
Returns vector of array dimensions
Definition at line 396 of file rtcArray.h.
bool rtc::Array< T, K >::write | ( | OutputHandler & | oh | ) | const [inline] |
Write state to a binary stream.
Reimplemented in rtc::Image< T >, and rtc::Image< Vec3uc >.
Definition at line 413 of file rtcArray.h.
Vec<int,K> rtc::Array< T, K >::dim [protected] |
array dimensions
Definition at line 88 of file rtcArray.h.
int rtc::Array< T, K >::len [protected] |
linear length of array
Definition at line 90 of file rtcArray.h.
Vec<int,K> rtc::Array< T, K >::mul [protected] |
multipliers for computing linear index
Definition at line 89 of file rtcArray.h.
T* rtc::Array< T, K >::x |
storage array
Definition at line 86 of file rtcArray.h.