Scippy

SoPlex

Sequential object-oriented simPlex

Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: More...

#include <spxid.h>

Inheritance diagram for SPxId:

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.
 
 SPxId (const SPxColId &cid)
 constructs an id out of a column identifier cid.
 
 SPxId (const SPxRowId &rid)
 constructs an id out of a row identifier rid.
 
SPxIdoperator= (const SPxId &id)
 assignment operator
 
SPxIdoperator= (const SPxColId &cid)
 assignment operator
 
SPxIdoperator= (const SPxRowId &rid)
 assignment operator
 
Access / modification
Type type () const
 returns the type of the id.
 
bool isValid () const
 returns TRUE iff the id is a valid column or row identifier.
 
void inValidate ()
 makes the id invalid.
 
bool isSPxRowId () const
 is id a row id?
 
bool isSPxColId () const
 is id a column id?
 
Comparison of Ids
int operator== (const SPxId &id) const
 equality operator.
 
int operator!= (const SPxId &id) const
 inequality operator.
 
bool operator< (const SPxId &id) const
 less then operator
 
- Public Member Functions inherited from DataKey
 DataKey ()
 Default constructor. Constructs an invalid DataKey.
 
 DataKey (int p_info, int p_idx)
 
DataKeyoperator= (const DataKey &rhs)
 Assignment operator.
 
 DataKey (const DataKey &old)
 Copy constructor.
 
int getIdx () const
 gets the index number (idx) of the DataKey.
 
void setIdx (int p_idx)
 sets the index number (idx) of the DataKey.
 
bool isValid () const
 returns TRUE, iff the DataKey is valid.
 
void inValidate ()
 makes the DataKey invalid and clears the info field.
 

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
 
int idx
 (locally) unique key index
 

Detailed Description

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.

Definition at line 85 of file spxid.h.

Member Enumeration Documentation

enum Type

type of the id.

Enumerator
ROW_ID 

row identifier.

INVALID 

invalid id.

COL_ID 

column identifier.

Definition at line 95 of file spxid.h.

Constructor & Destructor Documentation

SPxId ( )

default constructor. Constructs an invalid id.

Definition at line 107 of file spxid.h.

SPxId ( const SPxColId cid)
explicit

constructs an id out of a column identifier cid.

Definition at line 111 of file spxid.h.

SPxId ( const SPxRowId rid)
explicit

constructs an id out of a row identifier rid.

Definition at line 115 of file spxid.h.

Member Function Documentation

void inValidate ( )

makes the id invalid.

Definition at line 155 of file spxid.h.

References DataKey::info.

Referenced by SPxHarrisRT::selectEnter().

int operator!= ( const SPxId id) const

inequality operator.

Definition at line 180 of file spxid.h.

bool operator< ( const SPxId id) const

less then operator

Definition at line 185 of file spxid.h.

References DataKey::getIdx().

SPxId& operator= ( const SPxId id)

assignment operator

Definition at line 119 of file spxid.h.

References DataKey::operator=().

SPxId& operator= ( const SPxColId cid)

assignment operator

Definition at line 126 of file spxid.h.

References SPxId::COL_ID, DataKey::info, and DataKey::operator=().

SPxId& operator= ( const SPxRowId rid)

assignment operator

Definition at line 133 of file spxid.h.

References DataKey::info, DataKey::operator=(), and SPxId::ROW_ID.

int operator== ( const SPxId id) const

equality operator.

Definition at line 175 of file spxid.h.

Type type ( ) const

returns the type of the id.

Definition at line 145 of file spxid.h.

References SPxId::COL_ID, DataKey::info, SPxId::INVALID, and SPxId::ROW_ID.

Referenced by SPxHarrisRT::selectEnter(), and SPxSolver::unShift().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SPxId id 
)
friend

Definition at line 52 of file spxid.cpp.