LP column. 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< R > & | operator= (const LPColBase< R > &old) |
Assignment operator. 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 54 of file lpcolbase.h.
|
explicit |
Default constructor.
Construct LPColBase with a column vector ready for taking defDim
nonzeros.
Definition at line 80 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 90 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
Copy constructor.
Definition at line 111 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
Copy constructor.
Definition at line 119 of file lpcolbase.h.
References LPColBase< R >::isConsistent().
~LPColBase | ( | ) |
Destructor.
Definition at line 126 of file lpcolbase.h.
const SVectorBase< R > & colVector | ( | ) | const |
Gets constraint column vector.
Definition at line 171 of file lpcolbase.h.
References LPColBase< R >::vec.
Referenced by LPColSetBase< R >::add(), and SPxLPBase< R >::changeCol().
bool isConsistent | ( | ) | const |
Checks consistency.
Definition at line 189 of file lpcolbase.h.
References LPColBase< R >::vec.
Referenced by LPColBase< R >::LPColBase(), and LPColBase< R >::operator=().
R lower | ( | ) | const |
Gets lower bound.
Definition at line 160 of file lpcolbase.h.
References LPColBase< R >::low.
Referenced by LPColSetBase< R >::add(), and SPxLPBase< R >::changeCol().
R obj | ( | ) | const |
Gets objective value.
Definition at line 136 of file lpcolbase.h.
References LPColBase< R >::object.
Referenced by LPColSetBase< R >::add(), and SPxLPBase< R >::changeCol().
Assignment operator.
Definition at line 97 of file lpcolbase.h.
References LPColBase< R >::isConsistent(), LPColBase< R >::low, LPColBase< R >::object, LPColBase< R >::up, and LPColBase< R >::vec.
void setColVector | ( | const SVectorBase< R > & | p_vec | ) |
Sets constraint column vector.
Definition at line 177 of file lpcolbase.h.
References LPColBase< R >::vec.
Referenced by SPxLPBase< R >::getCol().
void setLower | ( | const R & | p_low | ) |
Sets lower bound.
Definition at line 165 of file lpcolbase.h.
References LPColBase< R >::low.
Referenced by SPxLPBase< R >::getCol().
void setObj | ( | const R & | p_object | ) |
Sets objective value.
Definition at line 142 of file lpcolbase.h.
Referenced by SPxLPBase< R >::getCol().
void setUpper | ( | const R & | p_up | ) |
Sets upper bound.
Definition at line 154 of file lpcolbase.h.
References LPColBase< R >::up.
Referenced by SPxLPBase< R >::getCol().
R upper | ( | ) | const |
Gets upper bound.
Definition at line 148 of file lpcolbase.h.
References LPColBase< R >::up.
Referenced by LPColSetBase< R >::add(), and SPxLPBase< R >::changeCol().
|
friend |
Definition at line 56 of file lpcolbase.h.
|
private |
lower bound
Definition at line 65 of file lpcolbase.h.
Referenced by LPColBase< R >::lower(), LPColBase< R >::operator=(), and LPColBase< R >::setLower().
|
private |
objective value
Definition at line 66 of file lpcolbase.h.
Referenced by LPColBase< R >::obj(), and LPColBase< R >::operator=().
|
private |
upper bound
Definition at line 64 of file lpcolbase.h.
Referenced by LPColBase< R >::operator=(), LPColBase< R >::setUpper(), and LPColBase< R >::upper().
|
private |
the column vector
Definition at line 67 of file lpcolbase.h.
Referenced by LPColBase< R >::colVector(), LPColBase< R >::isConsistent(), LPColBase< R >::operator=(), and LPColBase< R >::setColVector().