- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# IntVector Class Reference

an integer Vector data structure More...

`#include <OSGeneral.h>`

Inheritance diagram for IntVector:

[legend]
List of all members.

## 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

## Detailed Description

an integer Vector data structure

Definition at line 408 of file OSGeneral.h.

## Constructor & Destructor Documentation

IntVector::IntVector | ( |  | ) |

Definition at line 319 of file OSGeneral.cpp.

IntVector::~IntVector | ( |  | ) |

Definition at line 341 of file OSGeneral.cpp.

References bDeleteArrays, and el.

IntVector::IntVector | ( | int | n | ) |

Definition at line 330 of file OSGeneral.cpp.

References el, and numberOfEl.

## Member Function Documentation

bool IntVector::IsEqual | ( | IntVector * | that | ) |

A method to compare two invectors.

Definition at line 409 of file OSGeneral.cpp.

References DEBUG_ISEQUAL_ROUTINES, el, and numberOfEl.

Referenced by OtherOptionEnumeration::IsEqual().

bool IntVector::setRandom | ( | double | density,
|  | bool | conformant,
|  | int | iMin,
|  | int | iMax |
| ) |  |  |

A function to make a random instance of this class.

Parameters:

  | 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 458 of file OSGeneral.cpp.

References el, numberOfEl, OSiRand(), and OSRand().

Referenced by BasisStatus::setRandom(), and OtherOptionEnumeration::setRandom().

bool IntVector::setIntVector | ( | int * | i,
|  | int | ni |
| ) |  |  |

set values into an IntVector

Parameters:

  | ni | contains the dimension of the IntVector
  | i | contains the array of values

Definition at line 351 of file OSGeneral.cpp.

References el, and numberOfEl.

Referenced by BasisStatus::setIntVector(), and OtherOptionEnumeration::setOtherOptionEnumeration().

bool IntVector::extendIntVector | ( | int | i | ) |

append a value to an IntVector

Parameters:

  | i | contains the value to be appended

Definition at line 365 of file OSGeneral.cpp.

References numberOfEl.

Referenced by BasisStatus::addIdx().

int IntVector::getNumberOfEl | ( |  | ) |

get the dimension of an IntVector

Definition at line 390 of file OSGeneral.cpp.

References numberOfEl.

int IntVector::getEl | ( | int | j | ) |

get an entry in the data array of an IntVector

Parameters:

  | j | is the index of the entry that is to be retrieved

Definition at line 395 of file OSGeneral.cpp.

References el.

Referenced by BasisStatus::getIntVector(), OSResult::getOtherConstraintResultEnumerationEl(), OSResult::getOtherObjectiveResultEnumerationEl(), and OSResult::getOtherVariableResultEnumerationEl().

bool IntVector::getEl | ( | int * | i | ) |

Get the integer data array of an IntVector.

Parameters:

  | i | is the location where the user wants to store the array

Returns:
  the value

Note:
  it is the user's responsibility to reserve sufficient memory to hold the vector being returned.

Definition at line 402 of file OSGeneral.cpp.

References numberOfEl.

## Member Data Documentation

bool IntVector::bDeleteArrays

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

Definition at line 420 of file OSGeneral.h.

Referenced by ~IntVector(), and OSnl2osil::~OSnl2osil().

int IntVector::numberOfEl

Definition at line 421 of file OSGeneral.h.

Referenced by ConstraintOption::addOther(), ObjectiveOption::addOther(), VariableOption::addOther(), extendIntVector(), getEl(), BasisStatus::getNumberOfEl(), getNumberOfEl(), OSResult::getOtherConstraintResultEnumerationNumberOfEl(), OSResult::getOtherObjectiveResultEnumerationNumberOfEl(), OSResult::getOtherVariableResultEnumerationNumberOfEl(), OSOption::getSlackVariableInitialBasisStatusDense(), OSOption::getVariableInitialBasisStatusDense(), IntVector(), IsEqual(), setIntVector(), setRandom(), writeBasisStatus(), writeIntVectorData(), and writeOtherOptionEnumeration().

int* IntVector::el

Definition at line 422 of file OSGeneral.h.

Referenced by ConstraintOption::addOther(), ObjectiveOption::addOther(), VariableOption::addOther(), BasisStatus::getEl(), getEl(), OSInstance::getSparseJacobianFromColumnMajor(), OSInstance::getSparseJacobianFromRowMajor(), IntVector(), IsEqual(), OSInstance::processLinearConstraintCoefficients(), setIntVector(), OSInstance::setLinearConstraintCoefficients(), setRandom(), tempPrintArrays(), writeIntVectorData(), ~IntVector(), and OSmps2osil::~OSmps2osil().

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

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSGeneral.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSCommonInterfaces/OSGeneral.cpp