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

a sparse vector data structure More...

#include <OSGeneral.h>

Public Member Functions

 SparseVector (int number)
 Constructor. More...
 
 SparseVector ()
 Default Constructor. More...
 
 ~SparseVector ()
 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 nonzero. More...
 
double * values
 values holds a double array of nonzero values. More...
 

Detailed Description

a sparse vector data structure

Definition at line 122 of file OSGeneral.h.

Constructor & Destructor Documentation

SparseVector::SparseVector ( int  number)

Constructor.

Parameters
numberholds the size of the vector.

Definition at line 144 of file OSGeneral.cpp.

SparseVector::SparseVector ( )

Default Constructor.

Definition at line 156 of file OSGeneral.cpp.

SparseVector::~SparseVector ( )

Default destructor.

Definition at line 163 of file OSGeneral.cpp.

Member Data Documentation

bool SparseVector::bDeleteArrays

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

Definition at line 149 of file OSGeneral.h.

int SparseVector::number

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

Definition at line 154 of file OSGeneral.h.

int* SparseVector::indexes

indexes holds an integer array of indexes whose corresponding values are nonzero.

Definition at line 159 of file OSGeneral.h.

double* SparseVector::values

values holds a double array of nonzero values.

Definition at line 164 of file OSGeneral.h.


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