#include <Array.h>
Public Member Functions | |
void | cleanup () |
set length to zero | |
void | CleanUp () |
set length to zero | |
const int * | const_data () const |
pointer to the data | |
int * | Data () |
pointer to the data | |
const int * | Data () const |
pointer to the data | |
int * | data () |
pointer to the data | |
const int * | data () const |
pointer to the data | |
void | operator= (int ai) |
set the array equal to a constant | |
void | operator= (const SimpleIntArray &b) |
copy the elements of an array | |
int & | operator[] (int i) |
access element of the array - start at 0 | |
int | operator[] (int i) const |
access element of constant array | |
void | resize (int i, bool keep=false) |
change length, keep data if keep = true | |
void | ReSize (int i, bool keep=false) |
change length, keep data if keep = true | |
void | resize_keep (int i) |
change length, keep data | |
SimpleIntArray (int xn) | |
build an array length xn | |
SimpleIntArray () | |
build an array length 0 | |
SimpleIntArray (const SimpleIntArray &b) | |
make a new array equal to an existing one | |
int | Size () const |
return the size of the array | |
int | size () const |
return the size of the array | |
~SimpleIntArray () | |
return the space to memory | |
Protected Attributes | |
int * | a |
pointer to the array | |
int | n |
length of the array |
A very simple integer array class. A minimal array class to imitate a C style array but giving dynamic storage mostly intended for internal use by newmat. Probably to be replaced by a templated class when I start using templates.
SimpleIntArray::SimpleIntArray | ( | int | xn | ) |
build an array length xn
Definition at line 1831 of file NewMatExhaustive.cpp.
SimpleIntArray::SimpleIntArray | ( | ) | [inline] |
return the space to memory
Definition at line 1840 of file NewMatExhaustive.cpp.
SimpleIntArray::SimpleIntArray | ( | const SimpleIntArray & | b | ) |
make a new array equal to an existing one
Definition at line 1882 of file NewMatExhaustive.cpp.
void SimpleIntArray::cleanup | ( | ) | [inline] |
void SimpleIntArray::CleanUp | ( | ) | [inline, virtual] |
const int* SimpleIntArray::const_data | ( | ) | const [inline] |
int* SimpleIntArray::Data | ( | ) | [inline] |
const int* SimpleIntArray::Data | ( | ) | const [inline] |
int* SimpleIntArray::data | ( | ) | [inline] |
const int* SimpleIntArray::data | ( | ) | const [inline] |
void SimpleIntArray::operator= | ( | int | ai | ) |
set the array equal to a constant
Definition at line 1866 of file NewMatExhaustive.cpp.
void SimpleIntArray::operator= | ( | const SimpleIntArray & | b | ) |
copy the elements of an array
Definition at line 1872 of file NewMatExhaustive.cpp.
int & SimpleIntArray::operator[] | ( | int | i | ) |
access element of the array - start at 0
Definition at line 1847 of file NewMatExhaustive.cpp.
int SimpleIntArray::operator[] | ( | int | i | ) | const |
access element of constant array
Definition at line 1857 of file NewMatExhaustive.cpp.
void SimpleIntArray::resize | ( | int | i, |
bool | keep = false |
||
) |
change length, keep data if keep = true
Definition at line 1896 of file NewMatExhaustive.cpp.
void SimpleIntArray::ReSize | ( | int | i, |
bool | keep = false |
||
) | [inline] |
void SimpleIntArray::resize_keep | ( | int | i | ) | [inline] |
int SimpleIntArray::Size | ( | ) | const [inline] |
int SimpleIntArray::size | ( | ) | const [inline] |
int* SimpleIntArray::a [protected] |
int SimpleIntArray::n [protected] |