#include <newmat.h>
Inherits Janitor.
Public Member Functions | |
SimpleIntArray () | |
build an array length 0 | |
int | Size () const |
return the size of the array | |
int | size () const |
return the size of the array | |
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 | |
const int * | const_data () const |
pointer to the data | |
void | ReSize (int i, bool keep=false) |
change length, keep data if keep = true | |
void | resize_keep (int i) |
change length, keep data | |
void | cleanup () |
set length to zero | |
void | CleanUp () |
set length to zero | |
SimpleIntArray (int xn) | |
build an array length xn | |
~SimpleIntArray () | |
return the space to memory | |
int & | operator[] (int i) |
access element of the array - start at 0 | |
int | operator[] (int i) const |
access element of constant array | |
void | operator= (int ai) |
set the array equal to a constant | |
void | operator= (const SimpleIntArray &b) |
copy the elements of an array | |
SimpleIntArray (const SimpleIntArray &b) | |
make a new array equal to an existing one | |
void | resize (int i, bool keep=false) |
change length, keep data if keep = true | |
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.
Definition at line 1852 of file newmat.h.