Public Member Functions | Public Attributes | List of all members
SparseIntVector Class Reference

a sparse vector data structure for integer vectors More...

#include <OSGeneral.h>

Public Member Functions

 SparseIntVector (int number)
 Constructor. More...
 
 SparseIntVector ()
 Default Constructor. More...
 
 ~SparseIntVector ()
 Default destructor. More...
 

Public Attributes

bool bDeleteArrays
 bDeleteArrays is true if we delete the arrays in garbage collection set to true by default More...
 
int number
 number is the number of elements in the indexes and values arrays. More...
 
intindexes
 indexes holds an integer array of indexes whose corresponding values are listed in the same order in the values array. More...
 
intvalues
 values holds an integer array of nonzero values. More...
 

Detailed Description

a sparse vector data structure for integer vectors

Definition at line 171 of file OSGeneral.h.

Constructor & Destructor Documentation

SparseIntVector::SparseIntVector ( int  number)

Constructor.

Parameters
numberholds the size of the vector.

Definition at line 181 of file OSGeneral.cpp.

SparseIntVector::SparseIntVector ( )

Default Constructor.

Definition at line 190 of file OSGeneral.cpp.

SparseIntVector::~SparseIntVector ( )

Default destructor.

Definition at line 197 of file OSGeneral.cpp.

Member Data Documentation

bool SparseIntVector::bDeleteArrays

bDeleteArrays is true if we delete the arrays in garbage collection set to true by default

Definition at line 198 of file OSGeneral.h.

int SparseIntVector::number

number is the number of elements in the indexes and values arrays.

Definition at line 203 of file OSGeneral.h.

int* SparseIntVector::indexes

indexes holds an integer array of indexes whose corresponding values are listed in the same order in the values array.

Typically those would be nonzero.

Definition at line 210 of file OSGeneral.h.

int* SparseIntVector::values

values holds an integer array of nonzero values.

Definition at line 215 of file OSGeneral.h.


The documentation for this class was generated from the following files: