a sparse vector data structure More...
#include <OSGeneral.h>
Public Member Functions | |
SparseVector (int number) | |
Constructor. | |
SparseVector () | |
Default Constructor. | |
~SparseVector () | |
Default destructor. | |
Public Attributes | |
bool | bDeleteArrays |
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default | |
int | number |
number is the number of elements in the indexes and values arrays. | |
int * | indexes |
indexes holds an integer array of indexes, which corresponding values are nonzero. | |
double * | values |
values holds a double array of nonzero values. |
a sparse vector data structure
Definition at line 119 of file OSGeneral.h.
SparseVector::SparseVector | ( | int | number | ) |
Constructor.
number | holds the size of the vector. |
Definition at line 143 of file OSGeneral.cpp.
SparseVector::SparseVector | ( | ) |
Default Constructor.
Definition at line 152 of file OSGeneral.cpp.
SparseVector::~SparseVector | ( | ) |
Default destructor.
Definition at line 159 of file OSGeneral.cpp.
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default
Definition at line 146 of file OSGeneral.h.
number is the number of elements in the indexes and values arrays.
Definition at line 151 of file OSGeneral.h.
indexes holds an integer array of indexes, which corresponding values are nonzero.
Definition at line 156 of file OSGeneral.h.
double* SparseVector::values |
values holds a double array of nonzero values.
Definition at line 161 of file OSGeneral.h.