Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: More...
#include <spxid.h>
Public Types | |
Types | |
enum | Type { ROW_ID = -1, INVALID = 0, COL_ID = 1 } |
type of the id. More... | |
Public Member Functions | |
Construction / destruction | |
SPxId () | |
default constructor. Constructs an invalid id. More... | |
SPxId (const SPxColId &cid) | |
constructs an id out of a column identifier cid . More... | |
SPxId (const SPxRowId &rid) | |
constructs an id out of a row identifier rid . More... | |
SPxId & | operator= (const SPxId &id) |
assignment operator More... | |
SPxId & | operator= (const SPxColId &cid) |
assignment operator More... | |
SPxId & | operator= (const SPxRowId &rid) |
assignment operator More... | |
Access / modification | |
Type | type () const |
returns the type of the id. More... | |
bool | isValid () const |
returns TRUE iff the id is a valid column or row identifier. More... | |
void | inValidate () |
makes the id invalid. More... | |
bool | isSPxRowId () const |
is id a row id? More... | |
bool | isSPxColId () const |
is id a column id? More... | |
Comparison of Ids | |
int | operator== (const SPxId &id) const |
equality operator. More... | |
int | operator!= (const SPxId &id) const |
inequality operator. More... | |
bool | operator< (const SPxId &id) const |
less then operator More... | |
Public Member Functions inherited from DataKey | |
DataKey () | |
Default constructor. Constructs an invalid DataKey. More... | |
DataKey (int p_info, int p_idx) | |
DataKey & | operator= (const DataKey &rhs) |
Assignment operator. More... | |
DataKey (const DataKey &old) | |
Copy constructor. More... | |
int | getIdx () const |
gets the index number (idx) of the DataKey. More... | |
void | setIdx (int p_idx) |
sets the index number (idx) of the DataKey. More... | |
bool | isValid () const |
returns TRUE, iff the DataKey is valid. More... | |
void | inValidate () |
makes the DataKey invalid and clears the info field. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SPxId &id) |
Additional Inherited Members | |
Public Attributes inherited from DataKey | |
int | info |
user information to store values -1, 0, +1 More... | |
int | idx |
(locally) unique key index More... | |
Generic Ids for LP rows or columns.
Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds:
Rows and columns are numbered from 0 to num()-1 and 0 to dim()-1 respectively. These numbers may be used to select individual rows or columns. However, these numbers may change if other rows or columns are added or removed.
Further, each row or column of the problem matrix is assigned a SPxRowId or SPxColId, respectively. They are be used to select individual rows or columns just like numbers. In contrast to row and column numbers, ids remain unchanged for the time a row or column belongs to a SPxLP, no matter what other rows or columns are added to it or removed from it.
enum Type |
void inValidate | ( | ) |
makes the id invalid.
Definition at line 156 of file spxid.h.
References DataKey::info.
Referenced by SPxHarrisRT::selectEnter().
bool isSPxColId | ( | ) | const |
is id a column id?
Definition at line 166 of file spxid.h.
References DataKey::info.
Referenced by SoPlex::_getZeroDualMultiplierIndices(), SoPlex::checkBasisDualFeasibility(), SPxSolver::computePrimalray4Col(), SPxSolver::enter(), SoPlex::getBasisInverseRowReal(), SoPlex::getBasisInverseTimesVecReal(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::getPrimal(), SoPlex::multBasis(), SoPlex::multBasisTranspose(), SPxFastRT::selectEnter(), SPxFastRT::selectLeave(), SPxBoundFlippingRT::selectLeave(), SPxSolver::setPrimal(), SPxSolver::solve(), SPxRowId::SPxRowId(), and SPxSolver::ungetEnterVal().
bool isSPxRowId | ( | ) | const |
is id a row id?
Definition at line 161 of file spxid.h.
References DataKey::info.
Referenced by SoPlex::_getCompatibleColumns(), SoPlex::_getZeroDualMultiplierIndices(), SoPlex::checkBasisDualFeasibility(), SPxSolver::computeDualfarkas4Row(), SPxSolver::computeEnterCoPrhs(), SPxSolver::computeLeaveCoPrhs(), SPxSolver::getEnterVals(), SPxSolver::getEnterVals2(), SPxSolver::getLeaveVals(), SPxSolver::getLeaveVals2(), SPxSolver::leave(), SPxSolver::performSolutionPolishing(), SPxSolver::rejectLeave(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectLeave(), SPxSolver::setEnterBounds(), SPxSolver::setLeaveBounds(), SPxSolver::solve(), SPxColId::SPxColId(), and SPxSolver::ungetEnterVal().
bool isValid | ( | ) | const |
returns TRUE iff the id is a valid column or row identifier.
Definition at line 151 of file spxid.h.
References DataKey::info.
Referenced by SPxSolver::enter(), SPxSolver::leave(), SPxDefaultRT::selectEnter(), SPxDevexPR::selectEnter(), SPxSteepPR::selectEnter(), SPxFastRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxDantzigPR::selectEnterX(), SPxDevexPR::selectEnterX(), SPxSteepPR::selectEnterX(), SPxBoundFlippingRT::selectLeave(), and SPxSolver::solve().
int operator!= | ( | const SPxId & | id | ) | const |
bool operator< | ( | const SPxId & | id | ) | const |
assignment operator
Definition at line 127 of file spxid.h.
References DataKey::info, and DataKey::operator=().
assignment operator
Definition at line 134 of file spxid.h.
References DataKey::info, and DataKey::operator=().
Type type | ( | ) | const |
returns the type of the id.
Definition at line 146 of file spxid.h.
References DataKey::info.
Referenced by SPxHarrisRT::selectEnter(), and SPxSolver::unShift().