LP column.Class LPColBase provides a datatype for storing the column of an LP a the form similar to
\[ \begin{array}{rl} \hbox{max} & c^T x \\ \hbox{s.t.} & Ax \le b \\ & l \le x \le u \end{array} \]
Hence, an LPColBase consists of an objective value, a column DSVector and an upper and lower bound to the corresponding variable, which may include \(\pm\infty\). However, it depends on the LP code to use, what values are actually treated as \(\infty\). More...
#include <lpcolbase.h>
Public Member Functions | |
Construction / destruction | |
LPColBase (int defDim=0) | |
Default constructor. More... | |
LPColBase (const R &p_obj, const SVectorBase< R > &p_vector, const R &p_upper, const R &p_lower) | |
Initializing constructor. More... | |
LPColBase (const LPColBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
LPColBase (const LPColBase< S > &old) | |
Copy constructor. More... | |
~LPColBase () | |
Destructor. More... | |
Access / modification | |
R | obj () const |
Gets objective value. More... | |
void | setObj (const R &p_object) |
Sets objective value. More... | |
R | upper () const |
Gets upper bound. More... | |
void | setUpper (const R &p_up) |
Sets upper bound. More... | |
R | lower () const |
Gets lower bound. More... | |
void | setLower (const R &p_low) |
Sets lower bound. More... | |
const SVectorBase< R > & | colVector () const |
Gets constraint column vector. More... | |
void | setColVector (const SVectorBase< R > &p_vec) |
Sets constraint column vector. More... | |
Consistency check | |
bool | isConsistent () const |
Checks consistency. More... | |
Private Attributes | |
Data | |
R | up |
upper bound More... | |
R | low |
lower bound More... | |
R | object |
objective value More... | |
DSVectorBase< R > | vec |
the column vector More... | |
Friends | |
template<class S > | |
class | LPColBase |
LP column.
Class LPColBase provides a datatype for storing the column of an LP a the form similar to
\[ \begin{array}{rl} \hbox{max} & c^T x \\ \hbox{s.t.} & Ax \le b \\ & l \le x \le u \end{array} \]
Hence, an LPColBase consists of an objective value, a column DSVector and an upper and lower bound to the corresponding variable, which may include \(\pm\infty\). However, it depends on the LP code to use, what values are actually treated as \(\infty\).
Definition at line 45 of file lpcolbase.h.
|
explicit |
Default constructor.
Construct LPColBase with a column vector ready for taking defDim
nonzeros.
Definition at line 71 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
LPColBase | ( | const R & | p_obj, |
const SVectorBase< R > & | p_vector, | ||
const R & | p_upper, | ||
const R & | p_lower | ||
) |
Initializing constructor.
Definition at line 81 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
Copy constructor.
Definition at line 88 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
Copy constructor.
Definition at line 96 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
~LPColBase | ( | ) |
Destructor.
Definition at line 103 of file lpcolbase.h.
const SVectorBase<R>& colVector | ( | ) | const |
Gets constraint column vector.
Definition at line 148 of file lpcolbase.h.
References LPColBase< R >::vec.
Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< R >::changeCol().
bool isConsistent | ( | ) | const |
Checks consistency.
Definition at line 166 of file lpcolbase.h.
References DSVectorBase< R >::isConsistent().
Referenced by LPColBase< R >::LPColBase().
R lower | ( | ) | const |
Gets lower bound.
Definition at line 137 of file lpcolbase.h.
References LPColBase< R >::low.
Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< R >::changeCol().
R obj | ( | ) | const |
Gets objective value.
Definition at line 113 of file lpcolbase.h.
References LPColBase< R >::object.
Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< R >::changeCol().
void setColVector | ( | const SVectorBase< R > & | p_vec | ) |
Sets constraint column vector.
Definition at line 154 of file lpcolbase.h.
Referenced by SPxLPBase< R >::getCol().
void setLower | ( | const R & | p_low | ) |
Sets lower bound.
Definition at line 142 of file lpcolbase.h.
Referenced by SPxLPBase< R >::getCol().
void setObj | ( | const R & | p_object | ) |
Sets objective value.
Definition at line 119 of file lpcolbase.h.
Referenced by SPxLPBase< R >::getCol().
void setUpper | ( | const R & | p_up | ) |
Sets upper bound.
Definition at line 131 of file lpcolbase.h.
Referenced by SPxLPBase< R >::getCol().
R upper | ( | ) | const |
Gets upper bound.
Definition at line 125 of file lpcolbase.h.
References LPColBase< R >::up.
Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< R >::changeCol().
|
friend |
Definition at line 47 of file lpcolbase.h.
|
private |
|
private |
|
private |
|
private |
the column vector
Definition at line 58 of file lpcolbase.h.
Referenced by LPColBase< R >::colVector().