Loading...
Searching...
No Matches
lprowsetbase.h
Go to the documentation of this file.
44 * Class LPRowSetBase implements a set of \ref LPRowBase "LPRowBase%s". Unless for memory limitations, any number of
45 * LPRowBase%s may be #add%ed to an LPRowSetBase. Single or multiple LPRowBase%s may be added to an LPRowSetBase, where
46 * each method add() comes with two different signatures. One with and one without a parameter, used for returning the
47 * Keys assigned to the new LPRowBase%s by the set. See DataKey for a more detailed description of the concept of
48 * keys. For the concept of renumbering LPRowBase%s within an LPRowSetBase after removal of some LPRows see DataSet.
59 // ------------------------------------------------------------------------------------------------------------------
73 // ------------------------------------------------------------------------------------------------------------------
87 // ------------------------------------------------------------------------------------------------------------------
205 /// Returns the objective coefficient of the LPRowBase with DataKey \p k in LPRowSetBase (writeable).
299 /** The \em value of a row depends on its type: if the inequality is of type "greater or equal", the value is the lhs
327 // ------------------------------------------------------------------------------------------------------------------
330 * Extension methods come with two signatures, one of them providing a parameter to return the assigned
331 * DataKey(s). See DataSet for a more detailed description. All extension methods will automatically rearrange or
349 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to LPRowSetBase.
357 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to LPRowSetBase.
371 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to
400 /// Adds LPRowBase consisting of left hand side \p lhs, row vector \p rowVector, and right hand side \p rhs to
488 SVectorBase<R>& create(int pnonzeros = 0, const R& plhs = 0, const R& prhs = 1, const R& pobj = 0,
496 SVectorBase<R>& create(DataKey& newkey, int nonzeros = 0, const R& newlhs = 0, const R& newrhs = 1,
517 // ------------------------------------------------------------------------------------------------------------------
520 * See DataSet for a description of the renumbering of the remaining LPRowBase%s in a LPRowSetBase after the call of
613 // ------------------------------------------------------------------------------------------------------------------
616 * For a description of the memory management methods, see the documentation of SVSet, which has been used for
657 // ------------------------------------------------------------------------------------------------------------------
684 // ------------------------------------------------------------------------------------------------------------------
689 /** The user can specify the initial maximum number of rows \p max and the initial maximum number of nonzero entries
690 * \p memmax. If these parameters are omitted, a default size is used. However, one can add an arbitrary number of
Collection of dense, sparse, and semi-sparse vectors. 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 LPR... Definition lprowsetbase.h:350 void add(DataKey &pkey, const LPRowBase< R > &prow) Adds row to LPRowSetBase. Definition lprowsetbase.h:344 R & obj_w(int i) Returns the objective coefficient of the i 'th LPRowBase (writeable). Definition lprowsetbase.h:194 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 lprowsetbase.h:496 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:482 VectorBase< R > left vector of left hand sides (lower bounds) of LPRowBases. Definition lprowsetbase.h:63 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 lprowsetbase.h:488 const R & obj(const DataKey &k) const Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase. Definition lprowsetbase.h:200 DataKey key(int i) const Returns the DataKey of the i 'th LPRowBase in LPRowSetBase. Definition lprowsetbase.h:308 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 LPR... Definition lprowsetbase.h:402 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:469 const R & lhs(const DataKey &k) const Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. Definition lprowsetbase.h:128 const R & value(const DataKey &k) const Returns the value of the LPRowBase with DataKey k. Definition lprowsetbase.h:302 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 LPR... Definition lprowsetbase.h:374 int number(const DataKey &k) const Returns the number of the LPRowBase with DataKey k in LPRowSetBase. Definition lprowsetbase.h:314 SVectorBase< R > & rowVector_w(int i) Returns a writable rowVector of the i 'th LPRowBase. Definition lprowsetbase.h:212 LPRowSetBase< R > & operator=(const LPRowSetBase< R > &rs) Assignment operator. Definition lprowsetbase.h:701 R & rhs_w(const DataKey &k) Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase (writeable). Definition lprowsetbase.h:170 const R & obj(int i) const Returns the objective coefficient of the i 'th LPRowBase. Definition lprowsetbase.h:188 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 lprowsetbase.h:578 const R & rhs(const DataKey &k) const Returns the rhs of the LPRowBase with DataKey k in LPRowSetBase. Definition lprowsetbase.h:164 R & obj_w(const DataKey &k) Returns the objective coefficient of the LPRowBase with DataKey k in LPRowSetBase (writeable). Definition lprowsetbase.h:206 void memRemax(int newmax) Reallocates memory to be able to store newmax nonzeros. Definition lprowsetbase.h:644 const SVectorBase< R > & rowVector(const DataKey &k) const Returns the rowVector of the LPRowBase with DataKey k. Definition lprowsetbase.h:230 SVectorBase< R > & rowVector_w(const DataKey &k) Returns a writable rowVector of the LPRowBase with DataKey k. Definition lprowsetbase.h:224 const SVectorBase< R > & rowVector(int i) const Returns the rowVector of the i 'th LPRowBase. Definition lprowsetbase.h:218 VectorBase< R > & obj_w() Returns the vector of objective coefficients (writeable). Definition lprowsetbase.h:182 const VectorBase< R > & obj() const Returns the vector of objective coefficients. Definition lprowsetbase.h:176 bool has(const DataKey &k) const does DataKey k belong to LPRowSetBase ? Definition lprowsetbase.h:320 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:475 VectorBase< R > right vector of right hand sides (upper bounds) of LPRowBases. Definition lprowsetbase.h:64 LPRowBase< R >::Type type(const DataKey &k) const Returns the inequality type of the LPRowBase with DataKey k. Definition lprowsetbase.h:251 void reMax(int newmax=0) Reallocates memory to be able to store newmax LPRowBases. Definition lprowsetbase.h:622 void setType(int i, typename LPRowBase< R >::Type t) Changes the inequality type of row i to type. Definition lprowsetbase.h:257 void remove(const int nums[], int n) Removes n LPRowBases with row numbers given by nums. Definition lprowsetbase.h:570 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:359 R & lhs_w(const DataKey &k) Returns the lhs of the LPRowBase with DataKey k in LPRowSetBase. Definition lprowsetbase.h:134 void xtend(const DataKey &pkey, int pnewmax) Extends row with DataKey key to fit newmax nonzeros. Definition lprowsetbase.h:463 LPRowBase< R >::Type type(int i) const Returns the inequalitiy type of the i 'th LPRowBase. Definition lprowsetbase.h:236 LPRowSetBase< R > & operator=(const LPRowSetBase< S > &rs) Assignment operator. Definition lprowsetbase.h:719 void add(DataKey keys[], const LPRowSetBase< R > &set) Adds all LPRowBases of set to LPRowSetBase. Definition lprowsetbase.h:446 Exception class for things that should NEVER happen. Definition exceptions.h:119 void remove(const DataKey &removekey) Removes the vector with key removekey from the set. Definition svsetbase.h:645 void xtend(SVectorBase< R > &svec, int newmax) Extends svec to fit newmax nonzeros. Definition svsetbase.h:523 void add2(SVectorBase< R > &svec, int idx, R val) Adds nonzero (idx, val) to svec of this SVSetBase. Definition svsetbase.h:605 SVectorBase< R > & operator[](int n) Gets SVectorBase by number, writeable. Definition svsetbase.h:768 SVSetBase< R > & operator=(const SVSetBase< R > &rhs) Assignment operator. Definition svsetbase.h:1030 bool has(const DataKey &k) const True iff SVSetBase contains a SVectorBase for DataKey k. Definition svsetbase.h:834 Entry identifier class for items of a DataSet. (In)equality for LPs. Everything should be within this namespace. Debugging, floating point type and parameter definitions. #define SPX_MSG_ERROR(x) Prints out message x if the verbosity level is at least SPxOut::ERROR. Definition spxdefines.h:163
|