lprowsetbase.h
Go to the documentation of this file.
35 * Class LPRowSetBase implements a set of \ref LPRowBase "LPRowBase%s". Unless for memory limitations, any number of 36 * LPRowBase%s may be #add%ed to an LPRowSetBase. Single or multiple LPRowBase%s may be added to an LPRowSetBase, where 37 * each method add() comes with two different signatures. One with and one without a parameter, used for returning the 38 * Keys assigned to the new LPRowBase%s by the set. See DataKey for a more detailed description of the concept of 39 * keys. For the concept of renumbering LPRowBase%s within an LPRowSetBase after removal of some LPRows see DataSet. 50 // ------------------------------------------------------------------------------------------------------------------ 62 // ------------------------------------------------------------------------------------------------------------------ 76 // ------------------------------------------------------------------------------------------------------------------ 194 /// Returns the objective coefficient of the LPRowBase with DataKey \p k in LPRowSetBase (writeable). 281 /** The \em value of a row depends on its type: if the inequality is of type "greater or equal", the value is the lhs 309 // ------------------------------------------------------------------------------------------------------------------ 312 * Extension methods come with two signatures, one of them providing a parameter to return the assigned 313 * DataKey(s). See DataSet for a more detailed description. All extension methods will automatically rearrange or 331 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to LPRowSetBase. 338 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to LPRowSetBase. 340 void add(const S* lhsValue, const S* rowValues, const int* rowIndices, int rowSize, const S* rhsValue, const S* objValue = 0) 351 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to 354 void add(DataKey& newkey, const S* lhsValue, const S* rowValues, const int* rowIndices, int rowSize, const S* rhsValue, const S* objValue = 0) 378 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to 380 void add(DataKey& newkey, const R& newlhs, const SVectorBase<R>& newrowVector, const R& newrhs, const R& newobj = 0) 461 SVectorBase<R>& create(int pnonzeros = 0, const R& plhs = 0, const R& prhs = 1, const R& pobj = 0) 468 SVectorBase<R>& create(DataKey& newkey, int nonzeros = 0, const R& newlhs = 0, const R& newrhs = 1, const R& newobj = 0) 486 // ------------------------------------------------------------------------------------------------------------------ 489 * See DataSet for a description of the renumbering of the remaining LPRowBase%s in a LPRowSetBase after the call of 575 // ------------------------------------------------------------------------------------------------------------------ 578 * For a description of the memory management methods, see the documentation of SVSet, which has been used for 618 // ------------------------------------------------------------------------------------------------------------------ 634 return left.isConsistent() && right.isConsistent() && object.isConsistent() && SVSetBase<R>::isConsistent(); 642 // ------------------------------------------------------------------------------------------------------------------ 647 /** The user can specify the initial maximum number of rows \p max and the initial maximum number of nonzero entries 648 * \p memmax. If these parameters are omitted, a default size is used. However, one can add an arbitrary number of const VectorBase< R > & obj() const Returns the vector of objective coefficients. Definition: lprowsetbase.h:165 SVectorBase< R > & rowVector_w(const DataKey &k) Returns a writable rowVector of the LPRowBase with DataKey k. Definition: lprowsetbase.h:213 VectorBase< R > & obj_w() Returns the vector of objective coefficients (writeable). Definition: lprowsetbase.h:171 LPRowBase< R >::Type type(int i) const Returns the inequalitiy type of the i 'th LPRowBase. Definition: lprowsetbase.h:225 Exception class for things that should NEVER happen.This class is derived from the SoPlex exception b... Definition: exceptions.h:109 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 LPR... Definition: lprowsetbase.h:340 void reDim(int newdim, const bool setZero=true) Resets DVectorBase's dimension to newdim. Definition: dvectorbase.h:249 void add2(int i, int n, const int idx[], const R val[]) Adds n nonzero (idx, val)-pairs to i 'th rowVector. Definition: lprowsetbase.h:448 SVSetBase< R > & operator=(const SVSetBase< R > &rhs) Assignment operator. Definition: svsetbase.h:970 void add(DataKey keys[], const LPRowSetBase< R > &set) Adds all LPRowBases of set to LPRowSetBase. Definition: lprowsetbase.h:419 SVectorBase< R > & create(DataKey &newkey, int nonzeros=0, const R &newlhs=0, const R &newrhs=1, const R &newobj=0) Creates new LPRowBase with specified parameters and returns a reference to its row vector... Definition: lprowsetbase.h:468 LPRowBase< R >::Type type(const DataKey &k) const Returns the inequality type of the LPRowBase with DataKey k. Definition: lprowsetbase.h:238 Entry identifier class for items of a DataSet. R & rhs_w(int i) Returns the rhs of the i 'th LPRowBase (writeable). Definition: lprowsetbase.h:147 Dynamic dense vectors.Class DVectorBase is a derived class of VectorBase adding automatic memory mana... Definition: dvectorbase.h:48 Dense vector.Class VectorBase provides dense linear algebra vectors. It does not provide memory manag... Definition: dsvectorbase.h:28 const SVectorBase< R > & rowVector(int i) const Returns the rowVector of the i 'th LPRowBase. Definition: lprowsetbase.h:207 bool has(const DataKey &k) const True iff SVSetBase contains a SVectorBase for DataKey k. Definition: svsetbase.h:782 R & lhs_w(const DataKey &k) Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. Definition: lprowsetbase.h:123 void setType(int i, typename LPRowBase< R >::Type t) Changes the inequality type of row i to type. Definition: lprowsetbase.h:244 DataKey key(int i) const Returns the DataKey of the i 'th LPRowBase in LPRowSetBase. Definition: lprowsetbase.h:290 const R & obj(const DataKey &k) const Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. Definition: lprowsetbase.h:189 const R & lhs(int i) const Returns the lhs of the i 'th LPRowBase. Definition: lprowsetbase.h:105 void xtend(const DataKey &pkey, int pnewmax) Extends row with DataKey key to fit newmax nonzeros. Definition: lprowsetbase.h:436 DVectorBase< R > left vector of left hand sides (lower bounds) of LPRowBases. Definition: lprowsetbase.h:54 Entry identifier class for items of a DataSet.Every item in a DataSet is assigned a DataKey by which ... Definition: datakey.h:46 void memRemax(int newmax) Reallocates memory to be able to store newmax nonzeros. Definition: lprowsetbase.h:605 void add(DataKey &pkey, const LPRowBase< R > &prow) Adds row to LPRowSetBase. Definition: lprowsetbase.h:326 void reSize(int newsize) Resets DVectorBase's memory size to newsize. Definition: dvectorbase.h:266 void add2(int i, int n, const int idx[], const S val[]) Adds n nonzero (idx, val)-pairs to i 'th rowVector. Definition: lprowsetbase.h:455 LPRowSetBase< R > & operator=(const LPRowSetBase< R > &rs) Assignment operator. Definition: lprowsetbase.h:659 SVectorBase< R > & rowVector_w(int i) Returns a writable rowVector of the i 'th LPRowBase. Definition: lprowsetbase.h:201 SVectorBase< R > & operator[](int n) Gets SVectorBase by number, writeable. Definition: svsetbase.h:716 #define MSG_ERROR(x) Prints out message x if the verbosity level is at least SPxOut::ERROR. Definition: spxdefines.h:109 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: lprowsetbase.h:442 LPRowSetBase< R > & operator=(const LPRowSetBase< S > &rs) Assignment operator. Definition: lprowsetbase.h:676 (In)equality for LPs.Class LPRowBase provides constraints for linear programs in the form where a is... Definition: lprowbase.h:45 const R & value(int i) const Returns the value of the i'th LPRowBase. Definition: lprowsetbase.h:269 const R & lhs(const DataKey &k) const Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. Definition: lprowsetbase.h:117 Debugging, floating point type and parameter definitions. R & obj_w(int i) Returns the objective coefficient of the i 'th LPRowBase (writeable). Definition: lprowsetbase.h:183 void add(DataKey &newkey, const R &newlhs, const SVectorBase< R > &newrowVector, const R &newrhs, const R &newobj=0) Adds LPRowBase consisting of left hand side lhs, row vector rowVector, and right hand side rhs to LPR... Definition: lprowsetbase.h:380 Collection of dense, sparse, and semi-sparse vectors. Everything should be within this namespace. void reMax(int newmax=0) Reallocates memory to be able to store newmax LPRowBases. Definition: lprowsetbase.h:584 const SVectorBase< R > & rowVector(const DataKey &k) const Returns the rowVector of the LPRowBase with DataKey k. Definition: lprowsetbase.h:219 const R & rhs(int i) const Returns the rhs of the i 'th LPRowBase. Definition: lprowsetbase.h:141 R & obj_w(const DataKey &k) Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable)... Definition: lprowsetbase.h:195 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 LPR... Definition: lprowsetbase.h:354 (In)equality for LPs. const R & obj(int i) const Returns the objective coefficient of the i 'th LPRowBase. Definition: lprowsetbase.h:177 int number(const DataKey &k) const Returns the number of the LPRowBase with DataKey k in LPRowSetBase. Definition: lprowsetbase.h:296 Set of LP rows.Class LPRowSetBase implements a set of LPRowBase%s. Unless for memory limitations... Definition: lprowsetbase.h:44 SVectorBase< R > & create(int pnonzeros=0, const R &plhs=0, const R &prhs=1, const R &pobj=0) Creates new LPRowBase with specified parameters and returns a reference to its row vector... Definition: lprowsetbase.h:461 void add2(SVectorBase< R > &svec, int idx, R val) Adds nonzero (idx, val) to svec of this SVSetBase. Definition: svsetbase.h:553 void add(const R &plhs, const SVectorBase< R > &prowVector, const R &prhs, const R &pobj=0) Adds LPRowBase consisting of left hand side lhs, row vector rowVector, and right hand side rhs to LPR... Definition: lprowsetbase.h:332 const VectorBase< R > & rhs() const Returns the vector of rhs values. Definition: lprowsetbase.h:129 const R & value(const DataKey &k) const Returns the value of the LPRowBase with DataKey k. Definition: lprowsetbase.h:284 void xtend(SVectorBase< R > &svec, int newmax) Extends svec to fit newmax nonzeros. Definition: svsetbase.h:475 const R & rhs(const DataKey &k) const Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. Definition: lprowsetbase.h:153 void remove(const DataKey &removekey) Removes the vector with key removekey from the set. Definition: svsetbase.h:593 Sparse vectors.Class SVectorBase provides packed sparse vectors. Such are a sparse vectors... Definition: dvectorbase.h:31 DVectorBase< R > right vector of right hand sides (upper bounds) of LPRowBases. Definition: lprowsetbase.h:55 VectorBase< R > & rhs_w() Returns the vector of rhs values (writeable). Definition: lprowsetbase.h:135 bool has(const DataKey &k) const does DataKey k belong to LPRowSetBase ? Definition: lprowsetbase.h:302 R & rhs_w(const DataKey &k) Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). Definition: lprowsetbase.h:159 Sparse vector set.Class SVSetBase provides a set of sparse vectors SVectorBase. All SVectorBases in a... Definition: ssvectorbase.h:33 |