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< 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
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 54 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 80 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 90 of file lpcolbase.h.

References LPColBase< R >::isConsistent().

◆ LPColBase() [3/4]

LPColBase ( const LPColBase< R > &  old)

Copy constructor.

Definition at line 111 of file lpcolbase.h.

References LPColBase< R >::isConsistent().

◆ LPColBase() [4/4]

LPColBase ( const LPColBase< S > &  old)

Copy constructor.

Definition at line 119 of file lpcolbase.h.

References LPColBase< R >::isConsistent().

◆ ~LPColBase()

~LPColBase ( )

Destructor.

Definition at line 126 of file lpcolbase.h.

Member Function Documentation

◆ colVector()

const SVectorBase<R>& colVector ( ) const

Gets constraint column vector.

Definition at line 171 of file lpcolbase.h.

References LPColBase< R >::vec.

Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< BP >::changeCol().

◆ isConsistent()

bool isConsistent ( ) const

Checks consistency.

Definition at line 189 of file lpcolbase.h.

References DSVectorBase< R >::isConsistent().

Referenced by LPColBase< R >::LPColBase(), and LPColBase< R >::operator=().

◆ lower()

R lower ( ) const

Gets lower bound.

Definition at line 160 of file lpcolbase.h.

References LPColBase< R >::low.

Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< BP >::changeCol().

◆ obj()

R obj ( ) const

Gets objective value.

Definition at line 136 of file lpcolbase.h.

References LPColBase< R >::object.

Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< BP >::changeCol().

◆ operator=()

LPColBase<R>& operator= ( const LPColBase< R > &  old)

◆ setColVector()

void setColVector ( const SVectorBase< R > &  p_vec)

Sets constraint column vector.

Definition at line 177 of file lpcolbase.h.

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

◆ setLower()

void setLower ( const R &  p_low)

Sets lower bound.

Definition at line 165 of file lpcolbase.h.

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

◆ setObj()

void setObj ( const R &  p_object)

Sets objective value.

Definition at line 142 of file lpcolbase.h.

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

◆ setUpper()

void setUpper ( const R &  p_up)

Sets upper bound.

Definition at line 154 of file lpcolbase.h.

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

◆ upper()

R upper ( ) const

Gets upper bound.

Definition at line 148 of file lpcolbase.h.

References LPColBase< R >::up.

Referenced by LPColSetBase< Rational >::add(), and SPxLPBase< BP >::changeCol().

Friends And Related Function Documentation

◆ LPColBase

friend class LPColBase
friend

Definition at line 56 of file lpcolbase.h.

Member Data Documentation

◆ low

R low
private

lower bound

Definition at line 65 of file lpcolbase.h.

Referenced by LPColBase< R >::lower(), and LPColBase< R >::operator=().

◆ object

R object
private

objective value

Definition at line 66 of file lpcolbase.h.

Referenced by LPColBase< R >::obj(), and LPColBase< R >::operator=().

◆ up

R up
private

upper bound

Definition at line 64 of file lpcolbase.h.

Referenced by LPColBase< R >::operator=(), and LPColBase< R >::upper().

◆ vec

DSVectorBase<R> vec
private

the column vector

Definition at line 67 of file lpcolbase.h.

Referenced by LPColBase< R >::colVector(), and LPColBase< R >::operator=().