LPColSetBase< R > Class Template Reference Set of LP columns.Class LPColSetBase implements a set of LPColBase%s. Unless for memory limitations, any number of LPColBases may be added to an LPColSetBase. Single or multiple LPColBases may be added to an LPColSetBase, where each method add() comes with two different signatures. One with and one without a parameter, used for returning the DataKeys assigned to the new LPColBases by the set. See DataKey for a more detailed description of the concept of keys. For the concept of renumbering LPColBases within an LPColSetBase after removal of some LPColBases, see DataSet. More...
Inheritance diagram for LPColSetBase< R >:
![]()
Detailed Descriptiontemplate<class R>
|
|
explicit |
Default constructor.
The user can specify the initial maximum number of columns 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 columns to the LPColSetBase, which may result in automated memory realllocation.
Definition at line 569 of file lpcolsetbase.h.
LPColSetBase | ( | const LPColSetBase< R > & | rs | ) |
Copy constructor.
Definition at line 609 of file lpcolsetbase.h.
LPColSetBase | ( | const LPColSetBase< S > & | rs | ) |
Copy constructor.
Definition at line 620 of file lpcolsetbase.h.
|
virtual |
Destructor.
Definition at line 630 of file lpcolsetbase.h.
void add | ( | const LPColBase< R > & | pcol | ) |
Definition at line 253 of file lpcolsetbase.h.
Referenced by SoPlex::_transformEquality(), LPColSetBase< Real >::add(), SPxLPBase< Real >::addCol(), SoPlex::addColRational(), SPxLPBase< Real >::addCols(), SPxLPBase< Real >::doAddCol(), SPxLPBase< Real >::doAddCols(), SPxLPBase< Real >::doAddRows(), SPxLPBase< Real >::getCols(), SPxLPBase< Real >::getRows(), soplex::LPFreadColName(), and soplex::MPSreadCols().
Adds p pcol to LPColSetBase.
Definition at line 260 of file lpcolsetbase.h.
void add | ( | const R & | pobj, |
const R & | plower, | ||
const SVectorBase< R > & | pcolVector, | ||
const R & | pupper | ||
) |
Definition at line 266 of file lpcolsetbase.h.
void add | ( | DataKey & | newkey, |
const R & | obj, | ||
const R & | newlower, | ||
const SVectorBase< R > & | newcolVector, | ||
const R & | newupper | ||
) |
Adds LPColBase consisting of objective value obj
, lower bound lower
, column vector colVector
and upper bound upper
to LPColSetBase.
Definition at line 273 of file lpcolsetbase.h.
void add | ( | const S * | obj, |
const S * | lowerValue, | ||
const S * | colValues, | ||
const int * | colIndices, | ||
int | colSize, | ||
const S * | upperValue | ||
) |
Adds LPColBase consisting of left hand side lhs
, column vector colVector
, and right hand side rhs
to LPColSetBase.
Definition at line 291 of file lpcolsetbase.h.
void add | ( | DataKey & | newkey, |
const S * | objValue, | ||
const S * | lowerValue, | ||
const S * | colValues, | ||
const int * | colIndices, | ||
int | colSize, | ||
const S * | upperValue | ||
) |
Adds LPColBase consisting of left hand side lhs
, column vector colVector
, and right hand side rhs
to LPColSetBase, with DataKey key
.
Definition at line 300 of file lpcolsetbase.h.
void add | ( | const LPColSetBase< R > & | newset | ) |
Definition at line 317 of file lpcolsetbase.h.
void add | ( | DataKey | keys[], |
const LPColSetBase< R > & | newset | ||
) |
Adds all LPColBases of set
to LPColSetBase.
Definition at line 339 of file lpcolsetbase.h.
void add2 | ( | const DataKey & | k, |
int | n, | ||
const int | idx[], | ||
const R | val[] | ||
) |
Definition at line 362 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::addRow(), SPxLPBase< Real >::changeCol(), SPxLPBase< Real >::changeElement(), SPxLPBase< Real >::changeRow(), and SPxLPBase< Real >::doAddRow().
void add2 | ( | int | i, |
int | n, | ||
const int | idx[], | ||
const R | val[] | ||
) |
Adds n
nonzero (idx
, val
)-pairs to i
'th colVector.
Definition at line 368 of file lpcolsetbase.h.
void add2 | ( | int | i, |
int | n, | ||
const int | idx[], | ||
const S | val[] | ||
) |
Adds n
nonzero (idx
, val
)-pairs to i
'th colVector.
Definition at line 375 of file lpcolsetbase.h.
void clear | ( | ) |
Removes all LPColBases from the set.
Definition at line 485 of file lpcolsetbase.h.
Referenced by SoPlex::_transformEquality(), and SPxLPBase< Real >::clear().
|
protected |
Returns the complete SVSetBase.
Definition at line 66 of file lpcolsetbase.h.
Referenced by SPxEquiliSC::scale(), and SPxGeometSC::scale().
const SVectorBase<R>& colVector | ( | int | i | ) | const |
Returns colVector of i
'th LPColBase in LPColSetBase.
Definition at line 206 of file lpcolsetbase.h.
Referenced by SoPlex::_performOptIRStable(), SoPlex::_transformEquality(), SoPlex::_untransformEquality(), and SPxLPBase< Real >::colVector().
const SVectorBase<R>& colVector | ( | const DataKey & | k | ) | const |
Returns colVector of LPColBase with DataKey k
in LPColSetBase.
Definition at line 218 of file lpcolsetbase.h.
SVectorBase<R>& colVector_w | ( | int | i | ) |
Definition at line 200 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::add2(), SPxLPBase< Real >::colVector_w(), and LPColSetBase< Real >::xtend().
SVectorBase<R>& colVector_w | ( | const DataKey & | k | ) |
Returns writeable colVector of LPColBase with DataKey k
in LPColSetBase.
Definition at line 212 of file lpcolsetbase.h.
SVectorBase<R>& create | ( | int | pnonzeros = 0 , |
const R & | pobj = 1 , |
||
const R & | plw = 0 , |
||
const R & | pupp = 1 |
||
) |
Definition at line 381 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::create().
SVectorBase<R>& create | ( | DataKey & | newkey, |
int | nonzeros = 0 , |
||
const R & | obj = 1 , |
||
const R & | newlow = 0 , |
||
const R & | newup = 1 |
||
) |
Creates new LPColBase with specified arguments and returns a reference to its column vector.
Definition at line 388 of file lpcolsetbase.h.
bool has | ( | const DataKey & | k | ) | const |
Does DataKey k
belong to LPColSetBase ?
Definition at line 236 of file lpcolsetbase.h.
bool isConsistent | ( | ) | const |
Checks consistency.
Definition at line 541 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::isConsistent(), LPColSetBase< Real >::LPColSetBase(), and LPColSetBase< Real >::operator=().
DataKey key | ( | int | i | ) | const |
Returns DataKey of i
'th LPColBase in LPColSetBase.
Definition at line 224 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::add(), SoPlexLegacy::getColName(), and SoPlexLegacy::getRowName().
const VectorBase<R>& lower | ( | ) | const |
Definition at line 128 of file lpcolsetbase.h.
Referenced by SoPlex::_addColsReal(), LPColSetBase< Real >::add(), SoPlex::addColsRational(), SoPlex::addColsReal(), SPxLPBase< Real >::lower(), and SPxLPBase< R >::readLPF().
const R& lower | ( | int | i | ) | const |
Definition at line 140 of file lpcolsetbase.h.
const R& lower | ( | const DataKey & | k | ) | const |
Definition at line 152 of file lpcolsetbase.h.
VectorBase<R>& lower_w | ( | ) |
Returns vector of lower bound values.
Definition at line 134 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::changeBounds(), SPxLPBase< Real >::changeLower(), SPxLPBase< Real >::lower_w(), soplex::MPSreadBounds(), and SPxLPBase< R >::readLPF().
R& lower_w | ( | int | i | ) |
Returns lower bound of i
'th LPColBase in LPColSetBase.
Definition at line 146 of file lpcolsetbase.h.
R& lower_w | ( | const DataKey & | k | ) |
Returns lower bound of LPColBase with DataKey k
in LPColSetBase.
Definition at line 158 of file lpcolsetbase.h.
int max | ( | ) | const |
Returns maximum number of LPColBases currently fitting into LPColSetBase.
Definition at line 86 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::reMax().
const VectorBase<R>& maxObj | ( | ) | const |
Definition at line 92 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::add(), SPxLPBase< Real >::getObj(), and SPxLPBase< Real >::maxObj().
const R& maxObj | ( | int | i | ) | const |
Definition at line 104 of file lpcolsetbase.h.
const R& maxObj | ( | const DataKey & | k | ) | const |
Definition at line 116 of file lpcolsetbase.h.
VectorBase<R>& maxObj_w | ( | ) |
Returns vector of objective values w.r.t. maximization.
Definition at line 98 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::addCol(), SPxLPBase< Real >::addCols(), SPxLPBase< Real >::changeMaxObj(), SPxLPBase< Real >::changeObj(), SPxLPBase< Real >::changeSense(), SPxLPBase< Real >::doAddCol(), SPxLPBase< Real >::doAddCols(), SPxLPBase< Real >::maxObj_w(), and SPxLPBase< R >::readLPF().
R& maxObj_w | ( | int | i | ) |
Returns objective value (w.r.t. maximization) of i
'th LPColBase in LPColSetBase.
Definition at line 110 of file lpcolsetbase.h.
R& maxObj_w | ( | const DataKey & | k | ) |
Returns objective value (w.r.t. maximization) of LPColBase with DataKey k
in LPColSetBase.
Definition at line 122 of file lpcolsetbase.h.
int memMax | ( | ) | const |
Returns length of nonzero memory.
Definition at line 517 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::added2Set().
void memPack | ( | ) |
Garbage collection in nonzero memory.
Definition at line 529 of file lpcolsetbase.h.
void memRemax | ( | int | newmax | ) |
Resets length of nonzero memory.
Definition at line 523 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::addCols(), and SPxLPBase< R >::readMPS().
int memSize | ( | ) | const |
Returns used nonzero memory.
Definition at line 511 of file lpcolsetbase.h.
int num | ( | ) | const |
Returns the number of LPColBases currently in LPColSetBase.
Definition at line 80 of file lpcolsetbase.h.
Referenced by SoPlex::_addColsReal(), SoPlex::_performOptIRStable(), SoPlex::_transformEquality(), SoPlex::_untransformEquality(), LPColSetBase< Real >::add(), SoPlex::addColsRational(), SoPlex::addColsReal(), SPxLPBase< Real >::added2Set(), LPColSetBase< Real >::clear(), LPColSetBase< Real >::create(), SPxLPBase< Real >::doAddCols(), SPxLPBase< Real >::doAddRows(), LPColSetBase< Real >::isConsistent(), soplex::MPSreadCols(), SPxLPBase< Real >::nCols(), SPxLPBase< R >::readMPS(), and LPColSetBase< Real >::remove().
int number | ( | const DataKey & | k | ) | const |
Returns number of LPColBase with DataKey k
in LPColSetBase.
Definition at line 230 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::lower(), LPColSetBase< Real >::lower_w(), LPColSetBase< Real >::maxObj(), LPColSetBase< Real >::maxObj_w(), SPxLPBase< Real >::number(), LPColSetBase< Real >::remove(), LPColSetBase< Real >::upper(), and LPColSetBase< Real >::upper_w().
LPColSetBase<R>& operator= | ( | const LPColSetBase< R > & | rs | ) |
Assignment operator.
Definition at line 576 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::operator=().
LPColSetBase<R>& operator= | ( | const LPColSetBase< S > & | rs | ) |
Assignment operator.
Definition at line 593 of file lpcolsetbase.h.
void reMax | ( | int | newmax = 0 | ) |
Reallocates memory to be able to store newmax
LPColBases.
Definition at line 502 of file lpcolsetbase.h.
Referenced by SPxLPBase< R >::readMPS().
void remove | ( | int | i | ) |
Removes i
'th LPColBase.
Definition at line 416 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::doRemoveCol(), and SPxLPBase< Real >::doRemoveCols().
void remove | ( | const DataKey & | k | ) |
Removes LPColBase with DataKey k
.
Definition at line 428 of file lpcolsetbase.h.
void remove | ( | int | perm[] | ) |
Removes multiple elements.
Definition at line 434 of file lpcolsetbase.h.
void remove | ( | const int | nums[], |
int | n | ||
) |
Removes LPColBases with numbers nums
, where n
is the length of the array nums
.
Definition at line 456 of file lpcolsetbase.h.
void remove | ( | const int | nums[], |
int | n, | ||
int * | perm | ||
) |
Removes LPColBases with numbers nums
, where n
is the length of the array nums
, and stores the index permutation in array perm
.
Definition at line 463 of file lpcolsetbase.h.
const VectorBase<R>& upper | ( | ) | const |
Definition at line 164 of file lpcolsetbase.h.
Referenced by SoPlex::_addColsReal(), LPColSetBase< Real >::add(), SoPlex::addColsRational(), SoPlex::addColsReal(), SPxLPBase< R >::readLPF(), and SPxLPBase< Real >::upper().
const R& upper | ( | int | i | ) | const |
Definition at line 176 of file lpcolsetbase.h.
const R& upper | ( | const DataKey & | k | ) | const |
Definition at line 188 of file lpcolsetbase.h.
VectorBase<R>& upper_w | ( | ) |
Returns vector of upper bound values.
Definition at line 170 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::changeBounds(), SPxLPBase< Real >::changeUpper(), soplex::MPSreadBounds(), SPxLPBase< R >::readLPF(), and SPxLPBase< Real >::upper_w().
R& upper_w | ( | int | i | ) |
Returns upper bound of i
'th LPColBase in LPColSetBase.
Definition at line 182 of file lpcolsetbase.h.
R& upper_w | ( | const DataKey & | k | ) |
Returns upper bound of LPColBase with DataKey k
in LPColSetBase.
Definition at line 194 of file lpcolsetbase.h.
void xtend | ( | int | n, |
int | newmax | ||
) |
Extends column n
to fit newmax
nonzeros.
Definition at line 350 of file lpcolsetbase.h.
Referenced by SPxLPBase< Real >::addRows(), and SPxLPBase< Real >::doAddRows().
void xtend | ( | const DataKey & | pkey, |
int | pnewmax | ||
) |
Extends column with DataKey key
to fit newmax
nonzeros.
Definition at line 356 of file lpcolsetbase.h.
|
friend |
Definition at line 45 of file lpcolsetbase.h.
|
private |
vector of lower bounds.
Definition at line 53 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::lower(), LPColSetBase< Real >::lower_w(), and LPColSetBase< Real >::operator=().
|
private |
vector of objective coefficients.
Definition at line 55 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::maxObj(), LPColSetBase< Real >::maxObj_w(), and LPColSetBase< Real >::operator=().
|
private |
vector of upper bounds.
Definition at line 54 of file lpcolsetbase.h.
Referenced by LPColSetBase< Real >::operator=(), LPColSetBase< Real >::upper(), and LPColSetBase< Real >::upper_w().