Set of LP rows. More...
#include <lprowsetbase.h>
Public Member Functions | |
Access / modification | |
int | num () const |
Returns the number of LPRowBases in LPRowSetBase. More... | |
int | max () const |
Returns the maximum number of LPRowBases that fit. More... | |
const VectorBase< R > & | lhs () const |
Returns the vector of lhs values. More... | |
VectorBase< R > & | lhs_w () |
Returns the vector of lhs values. More... | |
const R & | lhs (int i) const |
Returns the lhs of the i 'th LPRowBase. More... | |
R & | lhs_w (int i) |
Returns the lhs of the i 'th LPRowBase. More... | |
const R & | lhs (const DataKey &k) const |
Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | lhs_w (const DataKey &k) |
Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
const VectorBase< R > & | rhs () const |
Returns the vector of rhs values. More... | |
VectorBase< R > & | rhs_w () |
Returns the vector of rhs values (writeable). More... | |
const R & | rhs (int i) const |
Returns the rhs of the i 'th LPRowBase. More... | |
R & | rhs_w (int i) |
Returns the rhs of the i 'th LPRowBase (writeable). More... | |
const R & | rhs (const DataKey &k) const |
Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | rhs_w (const DataKey &k) |
Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). More... | |
const VectorBase< R > & | obj () const |
Returns the vector of objective coefficients. More... | |
VectorBase< R > & | obj_w () |
Returns the vector of objective coefficients (writeable). More... | |
const R & | obj (int i) const |
Returns the objective coefficient of the i 'th LPRowBase. More... | |
R & | obj_w (int i) |
Returns the objective coefficient of the i 'th LPRowBase (writeable). More... | |
const R & | obj (const DataKey &k) const |
Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. More... | |
R & | obj_w (const DataKey &k) |
Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable). More... | |
SVectorBase< R > & | rowVector_w (int i) |
Returns a writable rowVector of the i 'th LPRowBase. More... | |
const SVectorBase< R > & | rowVector (int i) const |
Returns the rowVector of the i 'th LPRowBase. More... | |
SVectorBase< R > & | rowVector_w (const DataKey &k) |
Returns a writable rowVector of the LPRowBase with DataKey k . More... | |
const SVectorBase< R > & | rowVector (const DataKey &k) const |
Returns the rowVector of the LPRowBase with DataKey k . More... | |
LPRowBase< R >::Type | type (int i) const |
Returns the inequalitiy type of the i 'th LPRowBase. More... | |
LPRowBase< R >::Type | type (const DataKey &k) const |
Returns the inequality type of the LPRowBase with DataKey k . More... | |
void | setType (int i, typename LPRowBase< R >::Type t) |
Changes the inequality type of row i to type . More... | |
const R & | value (int i) const |
Returns the value of the i'th LPRowBase. More... | |
const R & | value (const DataKey &k) const |
Returns the value of the LPRowBase with DataKey k . More... | |
DataKey | key (int i) const |
Returns the DataKey of the i 'th LPRowBase in LPRowSetBase. More... | |
int | number (const DataKey &k) const |
Returns the number of the LPRowBase with DataKey k in LPRowSetBase. More... | |
bool | has (const DataKey &k) const |
does DataKey k belong to LPRowSetBase ? More... | |
Extension | |
Extension methods come with two signatures, one of them providing a parameter to return the assigned DataKey(s). See DataSet for a more detailed description. All extension methods will automatically rearrange or allocate more memory if required. | |
void | add (const LPRowBase< R > &row) |
void | add (DataKey &pkey, const LPRowBase< R > &prow) |
Adds row to LPRowSetBase. More... | |
void | add (const R &plhs, const SVectorBase< R > &prowVector, const R &prhs, const R &pobj=0, const int &pscaleExp=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase. More... | |
template<class S > | |
void | add (const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase. More... | |
template<class S > | |
void | add (DataKey &newkey, const S *lhsValue, const S *rowValues, const int *rowIndices, int rowSize, const S *rhsValue, const S *objValue=nullptr) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase, with DataKey key . More... | |
void | add (DataKey &newkey, const R &newlhs, const SVectorBase< R > &newrowVector, const R &newrhs, const R &newobj=0, const int &newscaleExp=0) |
Adds LPRowBase consisting of left hand side lhs , row vector rowVector , and right hand side rhs to LPRowSetBase, with DataKey key . More... | |
void | add (const LPRowSetBase< R > &newset) |
void | add (DataKey keys[], const LPRowSetBase< R > &set) |
Adds all LPRowBases of set to LPRowSetBase. More... | |
void | xtend (int n, int newmax) |
Extends row n to fit newmax nonzeros. More... | |
void | xtend (const DataKey &pkey, int pnewmax) |
Extends row with DataKey key to fit newmax nonzeros. More... | |
void | add2 (const DataKey &k, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to rowVector with DataKey k . More... | |
void | add2 (int i, int n, const int idx[], const R val[]) |
Adds n nonzero (idx , val )-pairs to i 'th rowVector. More... | |
template<class S > | |
void | add2 (int i, int n, const int idx[], const S val[]) |
Adds n nonzero (idx , val )-pairs to i 'th rowVector. More... | |
SVectorBase< R > & | create (int pnonzeros=0, const R &plhs=0, const R &prhs=1, const R &pobj=0, const int &pscaleExp=0) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector. More... | |
SVectorBase< R > & | create (DataKey &newkey, int nonzeros=0, const R &newlhs=0, const R &newrhs=1, const R &newobj=0, const int &newscaleExp=0) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector. More... | |
Shrinking | |
See DataSet for a description of the renumbering of the remaining LPRowBases in a LPRowSetBase after the call of a removal method. | |
void | remove (int i) |
Removes i 'th LPRowBase. More... | |
void | remove (const DataKey &k) |
Removes LPRowBase with DataKey k . More... | |
void | remove (int perm[]) |
Removes multiple LPRowBases. More... | |
void | remove (const int nums[], int n) |
Removes n LPRowBases with row numbers given by nums . More... | |
void | remove (const int nums[], int n, int *perm) |
Removes n LPRowBases with row numbers given by nums , Stores permutation of row indices in perm . More... | |
void | clear () |
Removes all LPRowBases. More... | |
Memory Management | |
For a description of the memory management methods, see the documentation of SVSet, which has been used for implementating LPRowSetBase. | |
void | reMax (int newmax=0) |
Reallocates memory to be able to store newmax LPRowBases. More... | |
int | memSize () const |
Returns number of used nonzero entries. More... | |
int | memMax () const |
Returns length of nonzero memory. More... | |
void | memRemax (int newmax) |
Reallocates memory to be able to store newmax nonzeros. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
Consistency check | |
bool | isConsistent () const |
Checks consistency. More... | |
Construction / Destruction | |
LPRowSetBase (int pmax=-1, int pmemmax=-1) | |
Default constructor. More... | |
LPRowSetBase< R > & | operator= (const LPRowSetBase< R > &rs) |
Assignment operator. More... | |
template<class S > | |
LPRowSetBase< R > & | operator= (const LPRowSetBase< S > &rs) |
Assignment operator. More... | |
LPRowSetBase (const LPRowSetBase< R > &rs) | |
Copy constructor. More... | |
template<class S > | |
LPRowSetBase (const LPRowSetBase< S > &rs) | |
Copy constructor. More... | |
virtual | ~LPRowSetBase () |
Destructor. More... | |
Protected Member Functions | |
Helpers | |
const SVSetBase< R > * | rowSet () const |
Returns the complete SVSet. More... | |
Protected Member Functions inherited from SVSetBase< R > | |
void | add (const SVectorBase< R > &svec) |
Adds svec to the set. More... | |
void | add (DataKey &nkey, const SVectorBase< R > &svec) |
Adds svec to SVSetBase. More... | |
template<class S > | |
void | add (DataKey &nkey, const S *rowValues, const int *rowIndices, int rowSize) |
Adds svec to SVSetBase. More... | |
void | add (const SVectorBase< R > svec[], int n) |
Adds all n SVectorBases in the array svec to the set. More... | |
void | add (DataKey nkey[], const SVectorBase< R > svec[], int n) |
Adds n SVectorBases to SVSetBase. More... | |
template<class S > | |
void | add (const SVSetBase< S > &pset) |
Adds all SVectorBases in pset to SVSetBase. More... | |
template<class S > | |
void | add (DataKey nkey[], const SVSetBase< S > &pset) |
Adds all SVectorBases of pset to SVSetBase. More... | |
SVectorBase< R > * | create (int idxmax=0) |
Creates new SVectorBase in set. More... | |
SVectorBase< R > * | create (DataKey &nkey, int idxmax=-1) |
Creates new SVectorBase in set. More... | |
void | xtend (SVectorBase< R > &svec, int newmax) |
Extends svec to fit newmax nonzeros. More... | |
void | add2 (SVectorBase< R > &svec, int idx, R val) |
Adds nonzero (idx , val ) to svec of this SVSetBase. More... | |
void | add2 (SVectorBase< R > &svec, int n, const int idx[], const R val[]) |
Adds n nonzeros to svec of this SVSetBase. More... | |
template<class S > | |
void | add2 (SVectorBase< R > &svec, int n, const int idx[], const S val[]) |
Adds n nonzeros to svec of this SVSetBase. More... | |
void | remove (const DataKey &removekey) |
Removes the vector with key removekey from the set. More... | |
void | remove (int removenum) |
Removes the vector with number removenum from the set. More... | |
void | remove (const SVectorBase< R > *svec) |
Removes one SVectorBase from set. More... | |
void | remove (int perm[]) |
Removes multiple elements. More... | |
void | remove (const DataKey keys[], int n) |
Removes n SVectorBases from set. More... | |
void | remove (const int nums[], int n) |
Removes n SVectorBases from set. More... | |
void | remove (const DataKey keys[], int n, int *perm) |
void | remove (const int nums[], int n, int *perm) |
void | clear (int minNewSize=-1) |
Removes all SVectorBases from set. More... | |
SVectorBase< R > & | operator[] (int n) |
Gets SVectorBase by number, writeable. More... | |
const SVectorBase< R > & | operator[] (int n) const |
Gets SVectorBase by number. More... | |
SVectorBase< R > & | operator[] (const DataKey &k) |
Gets SVectorBase by DataKey, writeable. More... | |
const SVectorBase< R > & | operator[] (const DataKey &k) const |
Gets SVectorBase by DataKey. More... | |
int | num () const |
Current number of SVectorBases. More... | |
int | max () const |
Current maximum number of SVectorBases. More... | |
DataKey | key (int n) const |
Gets DataKey of vector number. More... | |
DataKey | key (const SVectorBase< R > *svec) const |
Gets DataKey of SVectorBase. More... | |
int | number (const DataKey &k) const |
Gets vector number of DataKey. More... | |
int | number (const SVectorBase< R > *svec) const |
Gets vector number of SVectorBase. More... | |
bool | has (const DataKey &k) const |
True iff SVSetBase contains a SVectorBase for DataKey k . More... | |
bool | has (int n) const |
True iff SVSetBase contains a SVectorBase for vector number n. More... | |
bool | has (const SVectorBase< R > *svec) const |
Is an SVectorBase in the set? More... | |
int | memSize () const |
Used nonzero memory. More... | |
int | memMax () const |
Length of nonzero memory. More... | |
void | memRemax (int newmax) |
Reset length of nonzero memory. More... | |
void | memPack () |
Garbage collection in nonzero memory. More... | |
void | reMax (int newmax=0) |
Resets maximum number of SVectorBases. More... | |
bool | isConsistent () const |
Consistency check. More... | |
SVSetBase (int pmax=-1, int pmemmax=-1, double pfac=1.1, double pmemFac=1.2) | |
Default constructor. More... | |
virtual | ~SVSetBase () |
Destructor. More... | |
SVSetBase< R > & | operator= (const SVSetBase< R > &rhs) |
Assignment operator. More... | |
template<class S > | |
SVSetBase< R > & | operator= (const SVSetBase< S > &rhs) |
Assignment operator. More... | |
SVSetBase (const SVSetBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
SVSetBase (const SVSetBase< S > &old) | |
Copy constructor. More... | |
Protected Member Functions inherited from ClassArray< Nonzero< R > > | |
Nonzero< R > & | operator[] (int n) |
Reference to n 'th element. More... | |
const Nonzero< R > & | operator[] (int n) const |
Reference to n 'th const element. More... | |
Nonzero< R > & | last () |
Reference to last element. More... | |
const Nonzero< R > & | last () const |
Reference to last const element. More... | |
Nonzero< R > * | get_ptr () |
Gets a C pointer to the data. More... | |
const Nonzero< R > * | get_const_ptr () const |
Gets a const C pointer to the data. More... | |
void | append (const Nonzero< R > &t) |
Appends element t . More... | |
void | append (int n, const Nonzero< R > t[]) |
Appends n elements from t . More... | |
void | append (const ClassArray< Nonzero< R > > &t) |
Appends all elements from t . More... | |
void | insert (int i, int n) |
Inserts n uninitialized elements before i 'th element. More... | |
void | insert (int i, int n, const Nonzero< R > t[]) |
Inserts n elements from t before i 'the element. More... | |
void | insert (int i, const ClassArray< Nonzero< R > > &t) |
Inserts all elements from t before i 'th element. More... | |
void | remove (int n=0, int m=1) |
Removes m elements starting at n . More... | |
void | removeLast (int m=1) |
Removes m last elements. More... | |
void | clear () |
Removes all elements. More... | |
int | size () const |
Returns number of elements. More... | |
void | reSize (int newsize) |
Resets size to newsize . More... | |
int | max () const |
Returns maximum number of elements. More... | |
ptrdiff_t | reMax (int newMax=1, int newSize=-1) |
Resets maximum number of elements. More... | |
ClassArray & | operator= (const ClassArray &rhs) |
Assignment operator. More... | |
bool | isConsistent () const |
Consistency check. More... | |
ClassArray (const ClassArray &old) | |
Copy constructor. More... | |
ClassArray (int p_size=0, int p_max=0, double p_fac=1.2) | |
Default constructor. More... | |
virtual | ~ClassArray () |
Destructor. More... | |
Protected Attributes | |
DataArray< int > | scaleExp |
row scaling factors (stored as bitshift) More... | |
Protected Attributes inherited from ClassArray< Nonzero< R > > | |
int | thesize |
number of used elements in array data More... | |
int | themax |
the length of array data and More... | |
Nonzero< R > * | data |
the array of elements More... | |
double | memFactor |
memory extension factor. More... | |
Private Attributes | |
Data | |
VectorBase< R > | left |
vector of left hand sides (lower bounds) of LPRowBases. More... | |
VectorBase< R > | right |
vector of right hand sides (upper bounds) of LPRowBases. More... | |
VectorBase< R > | object |
vector of objective coefficients. More... | |
Friends | |
template<class S > | |
class | LPRowSetBase |
Set of LP rows.
Class LPRowSetBase implements a set of LPRowBase%s. Unless for memory limitations, any number of LPRowBases may be added to an LPRowSetBase. Single or multiple LPRowBases may be added to an LPRowSetBase, where each method add() comes with two different signatures. One with and one without a parameter, used for returning the Keys assigned to the new LPRowBases by the set. See DataKey for a more detailed description of the concept of keys. For the concept of renumbering LPRowBases within an LPRowSetBase after removal of some LPRows see DataSet.
Definition at line 53 of file lprowsetbase.h.
|
explicit |
Default constructor.
The user can specify the initial maximum number of rows max
and the initial maximum number of nonzero entries memmax
. If these parameters are omitted, a default size is used. However, one can add an arbitrary number of rows to the LPRowSetBase, which may result in automated memory realllocation.
Definition at line 694 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent().
LPRowSetBase | ( | const LPRowSetBase< R > & | rs | ) |
Copy constructor.
Definition at line 736 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent().
LPRowSetBase | ( | const LPRowSetBase< S > & | rs | ) |
Copy constructor.
Definition at line 748 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent().
|
virtual |
Destructor.
Definition at line 759 of file lprowsetbase.h.
void add | ( | const LPRowBase< R > & | row | ) |
Definition at line 337 of file lprowsetbase.h.
References LPRowSetBase< R >::add().
Referenced by LPRowSetBase< R >::add(), SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), and SPxLPBase< R >::doAddRows().
void add | ( | const LPRowSetBase< R > & | newset | ) |
Definition at line 422 of file lprowsetbase.h.
References SVSetBase< R >::add(), LPRowSetBase< R >::left, LPRowSetBase< R >::lhs(), LPRowSetBase< R >::num(), LPRowSetBase< R >::obj(), DataArray< T >::reSize(), LPRowSetBase< R >::rhs(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
void add | ( | const R & | plhs, |
const SVectorBase< R > & | prowVector, | ||
const R & | prhs, | ||
const R & | pobj = 0 , |
||
const int & | pscaleExp = 0 |
||
) |
Adds LPRowBase consisting of left hand side lhs
, row vector rowVector
, and right hand side rhs
to LPRowSetBase.
Definition at line 350 of file lprowsetbase.h.
References LPRowSetBase< R >::add().
void add | ( | const S * | lhsValue, |
const S * | rowValues, | ||
const int * | rowIndices, | ||
int | rowSize, | ||
const S * | rhsValue, | ||
const S * | objValue = 0 |
||
) |
Adds LPRowBase consisting of left hand side lhs
, row vector rowVector
, and right hand side rhs
to LPRowSetBase.
Definition at line 359 of file lprowsetbase.h.
References LPRowSetBase< R >::add().
void add | ( | DataKey & | newkey, |
const R & | newlhs, | ||
const SVectorBase< R > & | newrowVector, | ||
const R & | newrhs, | ||
const R & | newobj = 0 , |
||
const int & | newscaleExp = 0 |
||
) |
Adds LPRowBase consisting of left hand side lhs
, row vector rowVector
, and right hand side rhs
to LPRowSetBase, with DataKey key
.
Definition at line 402 of file lprowsetbase.h.
References SVSetBase< R >::add(), LPRowSetBase< R >::left, LPRowSetBase< R >::num(), DataArray< T >::reSize(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
void add | ( | DataKey & | newkey, |
const S * | lhsValue, | ||
const S * | rowValues, | ||
const int * | rowIndices, | ||
int | rowSize, | ||
const S * | rhsValue, | ||
const S * | objValue = nullptr |
||
) |
Adds LPRowBase consisting of left hand side lhs
, row vector rowVector
, and right hand side rhs
to LPRowSetBase, with DataKey key
.
Definition at line 374 of file lprowsetbase.h.
References SVSetBase< R >::add(), LPRowSetBase< R >::left, LPRowSetBase< R >::num(), and LPRowSetBase< R >::right.
Adds row
to LPRowSetBase.
Definition at line 344 of file lprowsetbase.h.
References LPRowSetBase< R >::add(), LPRowBase< R >::lhs(), LPRowBase< R >::obj(), LPRowBase< R >::rhs(), and LPRowBase< R >::rowVector().
void add | ( | DataKey | keys[], |
const LPRowSetBase< R > & | set | ||
) |
Adds all LPRowBases of set
to LPRowSetBase.
Definition at line 446 of file lprowsetbase.h.
References LPRowSetBase< R >::add(), LPRowSetBase< R >::key(), LPRowSetBase< R >::num(), and SVSetBase< R >::set.
void add2 | ( | const DataKey & | k, |
int | n, | ||
const int | idx[], | ||
const R | val[] | ||
) |
Adds n
nonzero (idx
, val
)-pairs to rowVector with DataKey k
.
Definition at line 469 of file lprowsetbase.h.
References SVSetBase< R >::add2(), and LPRowSetBase< R >::rowVector_w().
Referenced by SPxLPBase< R >::addCol(), SPxLPBase< R >::changeCol(), SPxLPBase< R >::changeElement(), SPxLPBase< R >::changeRow(), and SPxLPBase< R >::doAddCol().
void add2 | ( | int | i, |
int | n, | ||
const int | idx[], | ||
const R | val[] | ||
) |
Adds n
nonzero (idx
, val
)-pairs to i
'th rowVector.
Definition at line 475 of file lprowsetbase.h.
References SVSetBase< R >::add2(), and LPRowSetBase< R >::rowVector_w().
void add2 | ( | int | i, |
int | n, | ||
const int | idx[], | ||
const S | val[] | ||
) |
Adds n
nonzero (idx
, val
)-pairs to i
'th rowVector.
Definition at line 482 of file lprowsetbase.h.
References SVSetBase< R >::add2(), and LPRowSetBase< R >::rowVector_w().
void clear | ( | ) |
Removes all LPRowBases.
Definition at line 602 of file lprowsetbase.h.
References ClassArray< Nonzero< R > >::clear(), DataArray< T >::clear(), LPRowSetBase< R >::left, LPRowSetBase< R >::num(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
Referenced by SPxLPBase< R >::clear().
SVectorBase< R > & create | ( | DataKey & | newkey, |
int | nonzeros = 0 , |
||
const R & | newlhs = 0 , |
||
const R & | newrhs = 1 , |
||
const R & | newobj = 0 , |
||
const int & | newscaleExp = 0 |
||
) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector.
Definition at line 496 of file lprowsetbase.h.
References SVSetBase< R >::create(), LPRowSetBase< R >::left, LPRowSetBase< R >::num(), DataArray< T >::reSize(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
SVectorBase< R > & create | ( | int | pnonzeros = 0 , |
const R & | plhs = 0 , |
||
const R & | prhs = 1 , |
||
const R & | pobj = 0 , |
||
const int & | pscaleExp = 0 |
||
) |
Creates new LPRowBase with specified parameters and returns a reference to its row vector.
Definition at line 488 of file lprowsetbase.h.
References LPRowSetBase< R >::create().
Referenced by LPRowSetBase< R >::create().
bool has | ( | const DataKey & | k | ) | const |
does DataKey k
belong to LPRowSetBase ?
Definition at line 320 of file lprowsetbase.h.
References SVSetBase< R >::has().
Referenced by SPxLPBase< R >::has().
bool isConsistent | ( | ) | const |
Checks consistency.
Definition at line 662 of file lprowsetbase.h.
References SVSetBase< R >::isConsistent(), LPRowSetBase< R >::left, LPRowSetBase< R >::num(), LPRowSetBase< R >::right, and SPX_MSG_INCONSISTENT.
Referenced by SPxLPBase< R >::isConsistent(), LPRowSetBase< R >::LPRowSetBase(), and LPRowSetBase< R >::operator=().
DataKey key | ( | int | i | ) | const |
Returns the DataKey of the i
'th LPRowBase in LPRowSetBase.
Definition at line 308 of file lprowsetbase.h.
References SVSetBase< R >::key().
Referenced by LPRowSetBase< R >::add().
const VectorBase< R > & lhs | ( | ) | const |
Returns the vector of lhs values.
Definition at line 104 of file lprowsetbase.h.
References LPRowSetBase< R >::left.
Referenced by LPRowSetBase< R >::add(), SPxLPBase< R >::lhs(), LPRowSetBase< R >::setType(), LPRowSetBase< R >::type(), and LPRowSetBase< R >::value().
const R & lhs | ( | const DataKey & | k | ) | const |
Returns the lhs of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 128 of file lprowsetbase.h.
References LPRowSetBase< R >::left, and LPRowSetBase< R >::number().
const R & lhs | ( | int | i | ) | const |
Returns the lhs of the i
'th LPRowBase.
Definition at line 116 of file lprowsetbase.h.
References LPRowSetBase< R >::left.
VectorBase< R > & lhs_w | ( | ) |
Returns the vector of lhs values.
Definition at line 110 of file lprowsetbase.h.
References LPRowSetBase< R >::left.
Referenced by SPxLPBase< R >::changeLhs(), SPxLPBase< R >::changeRange(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::lhs_w(), and LPRowSetBase< R >::setType().
R & lhs_w | ( | const DataKey & | k | ) |
Returns the lhs of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 134 of file lprowsetbase.h.
References LPRowSetBase< R >::left, and LPRowSetBase< R >::number().
R & lhs_w | ( | int | i | ) |
Returns the lhs of the i
'th LPRowBase.
Definition at line 122 of file lprowsetbase.h.
References LPRowSetBase< R >::left.
int max | ( | ) | const |
Returns the maximum number of LPRowBases that fit.
Definition at line 98 of file lprowsetbase.h.
References SVSetBase< R >::max().
Referenced by LPRowSetBase< R >::reMax().
int memMax | ( | ) | const |
Returns length of nonzero memory.
Definition at line 638 of file lprowsetbase.h.
References SVSetBase< R >::memMax().
void memPack | ( | ) |
Garbage collection in nonzero memory.
Definition at line 650 of file lprowsetbase.h.
References SVSetBase< R >::memPack().
void memRemax | ( | int | newmax | ) |
Reallocates memory to be able to store newmax
nonzeros.
Definition at line 644 of file lprowsetbase.h.
References SVSetBase< R >::memRemax().
Referenced by SPxLPBase< R >::addRows().
int memSize | ( | ) | const |
Returns number of used nonzero entries.
Definition at line 632 of file lprowsetbase.h.
References SVSetBase< R >::memSize().
int num | ( | ) | const |
Returns the number of LPRowBases in LPRowSetBase.
Definition at line 92 of file lprowsetbase.h.
References SVSetBase< R >::num().
Referenced by LPRowSetBase< R >::add(), LPRowSetBase< R >::clear(), LPRowSetBase< R >::create(), LPRowSetBase< R >::isConsistent(), SPxLPBase< R >::nRows(), and LPRowSetBase< R >::remove().
int number | ( | const DataKey & | k | ) | const |
Returns the number of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 314 of file lprowsetbase.h.
References SVSetBase< R >::number().
Referenced by LPRowSetBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), SPxLPBase< R >::number(), LPRowSetBase< R >::obj(), LPRowSetBase< R >::obj_w(), LPRowSetBase< R >::remove(), LPRowSetBase< R >::rhs(), LPRowSetBase< R >::rhs_w(), LPRowSetBase< R >::type(), and LPRowSetBase< R >::value().
const VectorBase< R > & obj | ( | ) | const |
Returns the vector of objective coefficients.
Definition at line 176 of file lprowsetbase.h.
References LPRowSetBase< R >::object.
Referenced by LPRowSetBase< R >::add(), SPxLPBase< R >::getCol(), SPxLPBase< R >::getCols(), SPxLPBase< R >::getRowObj(), SPxLPBase< R >::maxRowObj(), and SPxLPBase< R >::obj().
const R & obj | ( | const DataKey & | k | ) | const |
Returns the objective coefficient of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 200 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
const R & obj | ( | int | i | ) | const |
Returns the objective coefficient of the i
'th LPRowBase.
Definition at line 188 of file lprowsetbase.h.
VectorBase< R > & obj_w | ( | ) |
Returns the vector of objective coefficients (writeable).
Definition at line 182 of file lprowsetbase.h.
References LPRowSetBase< R >::object.
Referenced by SPxLPBase< R >::changeRowObj(), SPxLPBase< R >::changeSense(), SPxLPBase< R >::clearRowObjs(), and SPxLPBase< R >::maxRowObj_w().
R & obj_w | ( | const DataKey & | k | ) |
Returns the objective coefficient of the LPRowBase with DataKey k
in LPRowSetBase (writeable).
Definition at line 206 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
R & obj_w | ( | int | i | ) |
Returns the objective coefficient of the i
'th LPRowBase (writeable).
Definition at line 194 of file lprowsetbase.h.
LPRowSetBase< R > & operator= | ( | const LPRowSetBase< R > & | rs | ) |
Assignment operator.
Definition at line 701 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent(), LPRowSetBase< R >::left, LPRowSetBase< R >::object, SVSetBase< R >::operator=(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
Referenced by SPxLPBase< R >::operator=().
LPRowSetBase< R > & operator= | ( | const LPRowSetBase< S > & | rs | ) |
Assignment operator.
Definition at line 719 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent(), LPRowSetBase< R >::left, LPRowSetBase< R >::object, SVSetBase< R >::operator=(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
void reMax | ( | int | newmax = 0 | ) |
Reallocates memory to be able to store newmax
LPRowBases.
Definition at line 622 of file lprowsetbase.h.
References LPRowSetBase< R >::left, LPRowSetBase< R >::max(), SVSetBase< R >::reMax(), DataArray< T >::reSize(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
void remove | ( | const DataKey & | k | ) |
Removes LPRowBase with DataKey k
.
Definition at line 540 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::remove().
void remove | ( | const int | nums[], |
int | n | ||
) |
Removes n
LPRowBases with row numbers given by nums
.
Definition at line 570 of file lprowsetbase.h.
References DataArray< T >::get_ptr(), LPRowSetBase< R >::num(), and LPRowSetBase< R >::remove().
void remove | ( | const int | nums[], |
int | n, | ||
int * | perm | ||
) |
Removes n
LPRowBases with row numbers given by nums
, Stores permutation of row indices in perm
.
Definition at line 578 of file lprowsetbase.h.
References LPRowSetBase< R >::left, LPRowSetBase< R >::num(), SVSetBase< R >::remove(), DataArray< T >::reSize(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
void remove | ( | int | i | ) |
Removes i
'th LPRowBase.
Definition at line 526 of file lprowsetbase.h.
References LPRowSetBase< R >::left, LPRowSetBase< R >::num(), SVSetBase< R >::remove(), DataArray< T >::reSize(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
Referenced by SPxLPBase< R >::doRemoveRow(), SPxLPBase< R >::doRemoveRows(), and LPRowSetBase< R >::remove().
void remove | ( | int | perm[] | ) |
Removes multiple LPRowBases.
Definition at line 546 of file lprowsetbase.h.
References LPRowSetBase< R >::left, LPRowSetBase< R >::num(), SVSetBase< R >::remove(), DataArray< T >::reSize(), LPRowSetBase< R >::right, and LPRowSetBase< R >::scaleExp.
const VectorBase< R > & rhs | ( | ) | const |
Returns the vector of rhs values.
Definition at line 140 of file lprowsetbase.h.
References LPRowSetBase< R >::right.
Referenced by LPRowSetBase< R >::add(), SPxLPBase< R >::getRhs(), SPxLPBase< R >::rhs(), LPRowSetBase< R >::setType(), LPRowSetBase< R >::type(), and LPRowSetBase< R >::value().
const R & rhs | ( | const DataKey & | k | ) | const |
Returns the rhs of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 164 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::right.
const R & rhs | ( | int | i | ) | const |
Returns the rhs of the i
'th LPRowBase.
Definition at line 152 of file lprowsetbase.h.
References LPRowSetBase< R >::right.
VectorBase< R > & rhs_w | ( | ) |
Returns the vector of rhs values (writeable).
Definition at line 146 of file lprowsetbase.h.
References LPRowSetBase< R >::right.
Referenced by SPxLPBase< R >::changeRange(), SPxLPBase< R >::changeRhs(), SPxLPBase< R >::doAddRow(), SPxLPBase< R >::doAddRows(), SPxLPBase< R >::rhs_w(), and LPRowSetBase< R >::setType().
R & rhs_w | ( | const DataKey & | k | ) |
Returns the rhs of the LPRowBase with DataKey k
in LPRowSetBase (writeable).
Definition at line 170 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::right.
R & rhs_w | ( | int | i | ) |
Returns the rhs of the i
'th LPRowBase (writeable).
Definition at line 158 of file lprowsetbase.h.
References LPRowSetBase< R >::right.
|
protected |
Returns the complete SVSet.
Definition at line 78 of file lprowsetbase.h.
const SVectorBase< R > & rowVector | ( | const DataKey & | k | ) | const |
Returns the rowVector of the LPRowBase with DataKey k
.
Definition at line 230 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
const SVectorBase< R > & rowVector | ( | int | i | ) | const |
Returns the rowVector of the i
'th LPRowBase.
Definition at line 218 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
Referenced by SPxLPBase< R >::rowVector().
SVectorBase< R > & rowVector_w | ( | const DataKey & | k | ) |
Returns a writable rowVector of the LPRowBase with DataKey k
.
Definition at line 224 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
SVectorBase< R > & rowVector_w | ( | int | i | ) |
Returns a writable rowVector of the i
'th LPRowBase.
Definition at line 212 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
Referenced by LPRowSetBase< R >::add2(), SPxLPBase< R >::rowVector_w(), and LPRowSetBase< R >::xtend().
void setType | ( | int | i, |
typename LPRowBase< R >::Type | t | ||
) |
Changes the inequality type of row i
to type
.
Definition at line 257 of file lprowsetbase.h.
References soplex::infinity, LPRowSetBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), LPRowSetBase< R >::rhs(), LPRowSetBase< R >::rhs_w(), and SPX_MSG_ERROR.
Returns the inequality type of the LPRowBase with DataKey k
.
Definition at line 251 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::type().
LPRowBase< R >::Type type | ( | int | i | ) | const |
Returns the inequalitiy type of the i
'th LPRowBase.
Definition at line 236 of file lprowsetbase.h.
References soplex::infinity, LPRowSetBase< R >::lhs(), and LPRowSetBase< R >::rhs().
Referenced by SPxLPBase< R >::has(), SPxLPBase< R >::number(), SPxLPBase< R >::rowType(), and LPRowSetBase< R >::type().
const R & value | ( | const DataKey & | k | ) | const |
Returns the value of the LPRowBase with DataKey k
.
The value of a row depends on its type: if the inequality is of type "greater or equal", the value is the lhs of the row. Otherwise, the value is the rhs.
Definition at line 302 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::value().
const R & value | ( | int | i | ) | const |
Returns the value of the i'th
LPRowBase.
Definition at line 287 of file lprowsetbase.h.
References soplex::infinity, LPRowSetBase< R >::lhs(), and LPRowSetBase< R >::rhs().
Referenced by LPRowSetBase< R >::value().
void xtend | ( | const DataKey & | pkey, |
int | pnewmax | ||
) |
Extends row with DataKey key
to fit newmax
nonzeros.
Definition at line 463 of file lprowsetbase.h.
References LPRowSetBase< R >::rowVector_w(), and SVSetBase< R >::xtend().
void xtend | ( | int | n, |
int | newmax | ||
) |
Extends row n
to fit newmax
nonzeros.
Definition at line 457 of file lprowsetbase.h.
References LPRowSetBase< R >::rowVector_w(), and SVSetBase< R >::xtend().
Referenced by SPxLPBase< R >::addCols(), and SPxLPBase< R >::doAddCols().
|
friend |
Definition at line 55 of file lprowsetbase.h.
|
private |
vector of left hand sides (lower bounds) of LPRowBases.
Definition at line 63 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::add(), LPRowSetBase< R >::clear(), LPRowSetBase< R >::create(), LPRowSetBase< R >::isConsistent(), LPRowSetBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), LPRowSetBase< R >::operator=(), LPRowSetBase< R >::reMax(), and LPRowSetBase< R >::remove().
|
private |
vector of objective coefficients.
Definition at line 65 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::obj(), LPRowSetBase< R >::obj_w(), and LPRowSetBase< R >::operator=().
|
private |
vector of right hand sides (upper bounds) of LPRowBases.
Definition at line 64 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::add(), LPRowSetBase< R >::clear(), LPRowSetBase< R >::create(), LPRowSetBase< R >::isConsistent(), LPRowSetBase< R >::operator=(), LPRowSetBase< R >::reMax(), LPRowSetBase< R >::remove(), LPRowSetBase< R >::rhs(), and LPRowSetBase< R >::rhs_w().
|
protected |
row scaling factors (stored as bitshift)
Definition at line 71 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::add(), LPRowSetBase< R >::clear(), LPRowSetBase< R >::create(), LPRowSetBase< R >::operator=(), LPRowSetBase< R >::reMax(), and LPRowSetBase< R >::remove().