an integer Vector data structure More...
#include <OSGeneral.h>
Public Member Functions | |
IntVector () | |
~IntVector () | |
IntVector (int n) | |
bool | IsEqual (IntVector *that) |
A method to compare two invectors. | |
bool | setRandom (double density, bool conformant, int iMin, int iMax) |
A function to make a random instance of this class. | |
bool | setIntVector (int *i, int ni) |
set values into an IntVector | |
bool | extendIntVector (int i) |
append a value to an IntVector | |
int | getNumberOfEl () |
get the dimension of an IntVector | |
int | getEl (int j) |
get an entry in the data array of an IntVector | |
bool | getEl (int *i) |
Get the integer data array of an IntVector. | |
Public Attributes | |
bool | bDeleteArrays |
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default | |
int | numberOfEl |
int * | el |
an integer Vector data structure
Definition at line 412 of file OSGeneral.h.
IntVector::IntVector | ( | ) |
Definition at line 352 of file OSGeneral.cpp.
IntVector::~IntVector | ( | ) |
Definition at line 374 of file OSGeneral.cpp.
IntVector::IntVector | ( | int | n | ) |
Definition at line 363 of file OSGeneral.cpp.
bool IntVector::IsEqual | ( | IntVector * | that | ) |
A method to compare two invectors.
Reimplemented in OtherOptionEnumeration.
Definition at line 444 of file OSGeneral.cpp.
bool IntVector::setRandom | ( | double | density, | |
bool | conformant, | |||
int | iMin, | |||
int | iMax | |||
) |
A function to make a random instance of this class.
density,: | corresponds to the probability that a particular child element is created | |
conformant,: | if true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" attributes and <XXX> children) | |
iMin,: | lowest value (inclusive) that an entry in this vector can take | |
iMax,: | greatest value (inclusive) that an entry in this vector can take |
Reimplemented in OtherOptionEnumeration.
Definition at line 495 of file OSGeneral.cpp.
bool IntVector::setIntVector | ( | int * | i, | |
int | ni | |||
) |
set values into an IntVector
ni | contains the dimension of the IntVector | |
i | contains the array of values |
Definition at line 386 of file OSGeneral.cpp.
bool IntVector::extendIntVector | ( | int | i | ) |
append a value to an IntVector
i | contains the value to be appended |
Definition at line 400 of file OSGeneral.cpp.
int IntVector::getNumberOfEl | ( | ) |
get the dimension of an IntVector
Definition at line 425 of file OSGeneral.cpp.
int IntVector::getEl | ( | int | j | ) |
get an entry in the data array of an IntVector
j | is the index of the entry that is to be retrieved |
Definition at line 430 of file OSGeneral.cpp.
bool IntVector::getEl | ( | int * | i | ) |
Get the integer data array of an IntVector.
i | is the location where the user wants to store the array |
Definition at line 437 of file OSGeneral.cpp.
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default
Definition at line 425 of file OSGeneral.h.
Definition at line 426 of file OSGeneral.h.
int* IntVector::el |
Definition at line 427 of file OSGeneral.h.