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. 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=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 (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 44 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 684 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent().
LPRowSetBase | ( | const LPRowSetBase< R > & | rs | ) |
Copy constructor.
Definition at line 726 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent().
LPRowSetBase | ( | const LPRowSetBase< S > & | rs | ) |
Copy constructor.
Definition at line 738 of file lprowsetbase.h.
References LPRowSetBase< R >::isConsistent().
|
virtual |
Destructor.
Definition at line 749 of file lprowsetbase.h.
void add | ( | const LPRowBase< R > & | row | ) |
Definition at line 328 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::add(), SPxLPBase< R >::addRow(), SPxLPBase< R >::addRows(), SPxLPBase< R >::doAddCols(), SPxLPBase< R >::doAddRow(), and SPxLPBase< R >::doAddRows().
Adds row
to LPRowSetBase.
Definition at line 335 of file lprowsetbase.h.
References LPRowSetBase< R >::add(), LPRowBase< R >::lhs(), LPRowBase< R >::obj(), LPRowBase< R >::rhs(), and LPRowBase< R >::rowVector().
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 341 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 350 of file lprowsetbase.h.
References LPRowSetBase< R >::add().
void add | ( | DataKey & | newkey, |
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, with DataKey key
.
Definition at line 365 of file lprowsetbase.h.
References SVSetBase< R >::add(), VectorBase< R >::dim(), LPRowSetBase< R >::num(), and VectorBase< R >::reDim().
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 393 of file lprowsetbase.h.
References SVSetBase< R >::add(), VectorBase< R >::dim(), LPRowSetBase< R >::num(), VectorBase< R >::reDim(), and DataArray< T >::reSize().
void add | ( | const LPRowSetBase< R > & | newset | ) |
Definition at line 413 of file lprowsetbase.h.
References SVSetBase< R >::add(), VectorBase< R >::dim(), LPRowSetBase< R >::lhs(), LPRowSetBase< R >::num(), LPRowSetBase< R >::obj(), VectorBase< R >::reDim(), DataArray< T >::reSize(), LPRowSetBase< R >::rhs(), and LPRowSetBase< R >::scaleExp.
void add | ( | DataKey | keys[], |
const LPRowSetBase< R > & | set | ||
) |
Adds all LPRowBases of set
to LPRowSetBase.
Definition at line 437 of file lprowsetbase.h.
References LPRowSetBase< R >::add(), LPRowSetBase< R >::key(), and LPRowSetBase< R >::num().
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 460 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 466 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 473 of file lprowsetbase.h.
References SVSetBase< R >::add2(), and LPRowSetBase< R >::rowVector_w().
void clear | ( | ) |
Removes all LPRowBases.
Definition at line 593 of file lprowsetbase.h.
References ClassArray< Nonzero< R > >::clear(), DataArray< T >::clear(), LPRowSetBase< R >::num(), and VectorBase< R >::reDim().
Referenced by SPxLPBase< R >::clear().
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 479 of file lprowsetbase.h.
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 487 of file lprowsetbase.h.
References SVSetBase< R >::create(), VectorBase< R >::dim(), LPRowSetBase< R >::num(), VectorBase< R >::reDim(), and DataArray< T >::reSize().
bool has | ( | const DataKey & | k | ) | const |
does DataKey k
belong to LPRowSetBase ?
Definition at line 311 of file lprowsetbase.h.
References SVSetBase< R >::has().
Referenced by SPxLPBase< R >::has().
bool isConsistent | ( | ) | const |
Checks consistency.
Definition at line 652 of file lprowsetbase.h.
References VectorBase< R >::dim(), SVSetBase< R >::isConsistent(), MSGinconsistent, and LPRowSetBase< R >::num().
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 299 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 95 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 | ( | int | i | ) | const |
Returns the lhs of the i
'th LPRowBase.
Definition at line 107 of file lprowsetbase.h.
const R& lhs | ( | const DataKey & | k | ) | const |
Returns the lhs of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 119 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
VectorBase<R>& lhs_w | ( | ) |
Returns the vector of lhs values.
Definition at line 101 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 | ( | int | i | ) |
Returns the lhs of the i
'th LPRowBase.
Definition at line 113 of file lprowsetbase.h.
R& lhs_w | ( | const DataKey & | k | ) |
Returns the lhs of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 125 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
int max | ( | ) | const |
Returns the maximum number of LPRowBases that fit.
Definition at line 89 of file lprowsetbase.h.
References SVSetBase< R >::max().
Referenced by LPRowSetBase< R >::reMax().
int memMax | ( | ) | const |
Returns length of nonzero memory.
Definition at line 629 of file lprowsetbase.h.
References SVSetBase< R >::memMax().
void memPack | ( | ) |
Garbage collection in nonzero memory.
Definition at line 641 of file lprowsetbase.h.
References SVSetBase< R >::memPack().
void memRemax | ( | int | newmax | ) |
Reallocates memory to be able to store newmax
nonzeros.
Definition at line 635 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 623 of file lprowsetbase.h.
References SVSetBase< R >::memSize().
int num | ( | ) | const |
Returns the number of LPRowBases in LPRowSetBase.
Definition at line 83 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 305 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 167 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 | ( | int | i | ) | const |
Returns the objective coefficient of the i
'th LPRowBase.
Definition at line 179 of file lprowsetbase.h.
const R& obj | ( | const DataKey & | k | ) | const |
Returns the objective coefficient of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 191 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
VectorBase<R>& obj_w | ( | ) |
Returns the vector of objective coefficients (writeable).
Definition at line 173 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 | ( | int | i | ) |
Returns the objective coefficient of the i
'th LPRowBase (writeable).
Definition at line 185 of file lprowsetbase.h.
R& obj_w | ( | const DataKey & | k | ) |
Returns the objective coefficient of the LPRowBase with DataKey k
in LPRowSetBase (writeable).
Definition at line 197 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
LPRowSetBase<R>& operator= | ( | const LPRowSetBase< R > & | rs | ) |
Assignment operator.
Definition at line 691 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 709 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 613 of file lprowsetbase.h.
References LPRowSetBase< R >::max(), SVSetBase< R >::reMax(), DataArray< T >::reSize(), and VectorBase< R >::reSize().
void remove | ( | int | i | ) |
Removes i
'th LPRowBase.
Definition at line 517 of file lprowsetbase.h.
References LPRowSetBase< R >::num(), VectorBase< R >::reDim(), SVSetBase< R >::remove(), and DataArray< T >::reSize().
Referenced by SPxLPBase< R >::doRemoveRow(), and SPxLPBase< R >::doRemoveRows().
void remove | ( | const DataKey & | k | ) |
Removes LPRowBase with DataKey k
.
Definition at line 531 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
void remove | ( | int | perm[] | ) |
Removes multiple LPRowBases.
Definition at line 537 of file lprowsetbase.h.
References LPRowSetBase< R >::num(), VectorBase< R >::reDim(), SVSetBase< R >::remove(), and DataArray< T >::reSize().
void remove | ( | const int | nums[], |
int | n | ||
) |
Removes n
LPRowBases with row numbers given by nums
.
Definition at line 561 of file lprowsetbase.h.
References DataArray< T >::get_ptr(), and LPRowSetBase< R >::num().
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 569 of file lprowsetbase.h.
References LPRowSetBase< R >::num(), VectorBase< R >::reDim(), SVSetBase< R >::remove(), and DataArray< T >::reSize().
const VectorBase<R>& rhs | ( | ) | const |
Returns the vector of rhs values.
Definition at line 131 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 | ( | int | i | ) | const |
Returns the rhs of the i
'th LPRowBase.
Definition at line 143 of file lprowsetbase.h.
const R& rhs | ( | const DataKey & | k | ) | const |
Returns the rhs of the LPRowBase with DataKey k
in LPRowSetBase.
Definition at line 155 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
VectorBase<R>& rhs_w | ( | ) |
Returns the vector of rhs values (writeable).
Definition at line 137 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 | ( | int | i | ) |
Returns the rhs of the i
'th LPRowBase (writeable).
Definition at line 149 of file lprowsetbase.h.
R& rhs_w | ( | const DataKey & | k | ) |
Returns the rhs of the LPRowBase with DataKey k
in LPRowSetBase (writeable).
Definition at line 161 of file lprowsetbase.h.
References LPRowSetBase< R >::number().
|
protected |
Returns the complete SVSet.
Definition at line 69 of file lprowsetbase.h.
const SVectorBase<R>& rowVector | ( | int | i | ) | const |
Returns the rowVector of the i
'th LPRowBase.
Definition at line 209 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
Referenced by SPxLPBase< R >::rowVector().
const SVectorBase<R>& rowVector | ( | const DataKey & | k | ) | const |
Returns the rowVector of the LPRowBase with DataKey k
.
Definition at line 221 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 203 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
Referenced by LPRowSetBase< R >::add2(), SPxLPBase< R >::rowVector_w(), and LPRowSetBase< R >::xtend().
SVectorBase<R>& rowVector_w | ( | const DataKey & | k | ) |
Returns a writable rowVector of the LPRowBase with DataKey k
.
Definition at line 215 of file lprowsetbase.h.
References SVSetBase< R >::operator[]().
void setType | ( | int | i, |
typename LPRowBase< R >::Type | t | ||
) |
Changes the inequality type of row i
to type
.
Definition at line 248 of file lprowsetbase.h.
References soplex::infinity, LPRowSetBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), MSG_ERROR, LPRowSetBase< R >::rhs(), and LPRowSetBase< R >::rhs_w().
LPRowBase<R>::Type type | ( | int | i | ) | const |
Returns the inequalitiy type of the i
'th LPRowBase.
Definition at line 227 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().
Returns the inequality type of the LPRowBase with DataKey k
.
Definition at line 242 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::type().
const R& value | ( | int | i | ) | const |
Returns the value of the i'th
LPRowBase.
Definition at line 278 of file lprowsetbase.h.
References soplex::infinity, LPRowSetBase< R >::lhs(), and LPRowSetBase< R >::rhs().
Referenced by LPRowSetBase< R >::value().
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 293 of file lprowsetbase.h.
References LPRowSetBase< R >::number(), and LPRowSetBase< R >::value().
void xtend | ( | int | n, |
int | newmax | ||
) |
Extends row n
to fit newmax
nonzeros.
Definition at line 448 of file lprowsetbase.h.
References LPRowSetBase< R >::rowVector_w(), and SVSetBase< R >::xtend().
Referenced by SPxLPBase< R >::addCols(), and SPxLPBase< R >::doAddCols().
void xtend | ( | const DataKey & | pkey, |
int | pnewmax | ||
) |
Extends row with DataKey key
to fit newmax
nonzeros.
Definition at line 454 of file lprowsetbase.h.
References LPRowSetBase< R >::rowVector_w(), and SVSetBase< R >::xtend().
|
friend |
Definition at line 46 of file lprowsetbase.h.
|
private |
vector of left hand sides (lower bounds) of LPRowBases.
Definition at line 54 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::lhs(), LPRowSetBase< R >::lhs_w(), and LPRowSetBase< R >::operator=().
|
private |
vector of objective coefficients.
Definition at line 56 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 55 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::operator=(), LPRowSetBase< R >::rhs(), and LPRowSetBase< R >::rhs_w().
|
protected |
row scaling factors (stored as bitshift)
Definition at line 62 of file lprowsetbase.h.
Referenced by LPRowSetBase< R >::add(), and LPRowSetBase< R >::operator=().