Scippy

SoPlex

Sequential object-oriented simPlex

LPColBase< R > Class Template Reference

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
obj () const
 Gets objective value. More...
 
void setObj (const R &p_object)
 Sets objective value. More...
 
upper () const
 Gets upper bound. More...
 
void setUpper (const R &p_up)
 Sets upper bound. More...
 
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
up
 upper bound More...
 
low
 lower bound More...
 
object
 objective value More...
 
DSVectorBase< R > vec
 the column vector More...
 

Friends

template<class S >
class LPColBase
 

Detailed Description

template<class R>
class soplex::LPColBase< R >

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.

Constructor & Destructor Documentation

◆ LPColBase() [1/4]

LPColBase ( int  defDim = 0)
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() [2/4]

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().

◆ LPColBase() [3/4]

LPColBase ( const LPColBase< R > &  old)

Copy constructor.

Definition at line 88 of file lpcolbase.h.

References LPColBase< R >::isConsistent().

◆ LPColBase() [4/4]

LPColBase ( const LPColBase< S > &  old)

Copy constructor.

Definition at line 96 of file lpcolbase.h.

References LPColBase< R >::isConsistent().

◆ ~LPColBase()

~LPColBase ( )

Destructor.

Definition at line 103 of file lpcolbase.h.

Member Function Documentation

◆ colVector()

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().

◆ isConsistent()

bool isConsistent ( ) const

Checks consistency.

Definition at line 166 of file lpcolbase.h.

References DSVectorBase< R >::isConsistent().

Referenced by LPColBase< R >::LPColBase().

◆ lower()

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().

◆ obj()

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().

◆ setColVector()

void setColVector ( const SVectorBase< R > &  p_vec)

Sets constraint column vector.

Definition at line 154 of file lpcolbase.h.

Referenced by SPxLPBase< R >::getCol().

◆ setLower()

void setLower ( const R &  p_low)

Sets lower bound.

Definition at line 142 of file lpcolbase.h.

Referenced by SPxLPBase< R >::getCol().

◆ setObj()

void setObj ( const R &  p_object)

Sets objective value.

Definition at line 119 of file lpcolbase.h.

Referenced by SPxLPBase< R >::getCol().

◆ setUpper()

void setUpper ( const R &  p_up)

Sets upper bound.

Definition at line 131 of file lpcolbase.h.

Referenced by SPxLPBase< R >::getCol().

◆ upper()

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().

Friends And Related Function Documentation

◆ LPColBase

friend class LPColBase
friend

Definition at line 47 of file lpcolbase.h.

Member Data Documentation

◆ low

R low
private

lower bound

Definition at line 56 of file lpcolbase.h.

Referenced by LPColBase< R >::lower().

◆ object

R object
private

objective value

Definition at line 57 of file lpcolbase.h.

Referenced by LPColBase< R >::obj().

◆ up

R up
private

upper bound

Definition at line 55 of file lpcolbase.h.

Referenced by LPColBase< R >::upper().

◆ vec

DSVectorBase<R> vec
private

the column vector

Definition at line 58 of file lpcolbase.h.

Referenced by LPColBase< R >::colVector().