Scippy

SoPlex

Sequential object-oriented simPlex

LPColBase< R > Class Template Reference

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
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< R >::add(), and SPxLPBase< R >::changeCol().

◆ isConsistent()

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

◆ lower()

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

◆ obj()

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

◆ 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.

References LPColBase< R >::vec.

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

◆ setLower()

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

◆ setObj()

void setObj ( const R &  p_object)

Sets objective value.

Definition at line 142 of file lpcolbase.h.

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

◆ setUpper()

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

◆ upper()

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

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(), LPColBase< R >::operator=(), and LPColBase< R >::setLower().

◆ 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=(), LPColBase< R >::setUpper(), and LPColBase< R >::upper().

◆ vec