Scippy

SoPlex

Sequential object-oriented simPlex

SolBase< R > Class Template Reference

Class for storing a primal-dual solution with basis information. More...

#include <solbase.h>

Public Member Functions

bool isPrimalFeasible () const
 is the stored solution primal feasible? More...
 
bool getPrimalSol (VectorBase< R > &vector) const
 gets the primal solution vector; returns true on success More...
 
bool getSlacks (VectorBase< R > &vector) const
 gets the vector of slack values; returns true on success More...
 
bool hasPrimalRay () const
 is a primal unbounded ray available? More...
 
bool getPrimalRaySol (VectorBase< R > &vector) const
 gets the primal unbounded ray if available; returns true on success More...
 
bool isDualFeasible () const
 is a dual solution available? More...
 
bool getDualSol (VectorBase< R > &vector) const
 gets the dual solution vector; returns true on success More...
 
bool getRedCostSol (VectorBase< R > &vector) const
 gets the vector of reduced cost values if available; returns true on success More...
 
bool hasDualFarkas () const
 is a dual farkas ray available? More...
 
bool getDualFarkasSol (VectorBase< R > &vector) const
 gets the Farkas proof if available; returns true on success More...
 
int totalSizePrimal (const int base=2) const
 returns total size of primal solution More...
 
int totalSizeDual (const int base=2) const
 returns total size of dual solution More...
 
int dlcmSizePrimal (const int base=2) const
 returns size of least common multiple of denominators in primal solution More...
 
int dlcmSizeDual (const int base=2) const
 returns size of least common multiple of denominators in dual solution More...
 
int dmaxSizePrimal (const int base=2) const
 returns size of largest denominator in primal solution More...
 
int dmaxSizeDual (const int base=2) const
 returns size of largest denominator in dual solution More...
 
void invalidate ()
 invalidate solution More...
 

Private Member Functions

 SolBase ()
 default constructor only for friends More...
 
SolBase< R > & operator= (const SolBase< R > &sol)
 assignment operator only for friends More...
 
template<class S >
SolBase< R > & operator= (const SolBase< S > &sol)
 assignment operator only for friends More...
 

Private Attributes

VectorBase< R > _primal
 
VectorBase< R > _slacks
 
VectorBase< R > _primalRay
 
VectorBase< R > _dual
 
VectorBase< R > _redCost
 
VectorBase< R > _dualFarkas
 
_objVal
 
unsigned int _isPrimalFeasible: 1
 
unsigned int _hasPrimalRay: 1
 
unsigned int _isDualFeasible: 1
 
unsigned int _hasDualFarkas: 1
 

Friends

template<class T >
class SoPlexBase
 
template<class S >
class SolBase
 

Detailed Description

template<class R>
class soplex::SolBase< R >

Class for storing a primal-dual solution with basis information.

Definition at line 44 of file solbase.h.

Constructor & Destructor Documentation

◆ SolBase()

SolBase ( )
private

default constructor only for friends

Definition at line 236 of file solbase.h.

Member Function Documentation

◆ dlcmSizeDual()

int dlcmSizeDual ( const int  base = 2) const

returns size of least common multiple of denominators in dual solution

Definition at line 170 of file solbase.h.

◆ dlcmSizePrimal()

int dlcmSizePrimal ( const int  base = 2) const

returns size of least common multiple of denominators in primal solution

Definition at line 156 of file solbase.h.

◆ dmaxSizeDual()

int dmaxSizeDual ( const int  base = 2) const

returns size of largest denominator in dual solution

Definition at line 198 of file solbase.h.

◆ dmaxSizePrimal()

int dmaxSizePrimal ( const int  base = 2) const

returns size of largest denominator in primal solution

Definition at line 184 of file solbase.h.

◆ getDualFarkasSol()

bool getDualFarkasSol ( VectorBase< R > &  vector) const

gets the Farkas proof if available; returns true on success

Definition at line 119 of file solbase.h.

◆ getDualSol()

bool getDualSol ( VectorBase< R > &  vector) const

gets the dual solution vector; returns true on success

Definition at line 97 of file solbase.h.

◆ getPrimalRaySol()

bool getPrimalRaySol ( VectorBase< R > &  vector) const

gets the primal unbounded ray if available; returns true on success

Definition at line 82 of file solbase.h.

◆ getPrimalSol()

bool getPrimalSol ( VectorBase< R > &  vector) const

gets the primal solution vector; returns true on success

Definition at line 60 of file solbase.h.

◆ getRedCostSol()

bool getRedCostSol ( VectorBase< R > &  vector) const

gets the vector of reduced cost values if available; returns true on success

Definition at line 105 of file solbase.h.

◆ getSlacks()

bool getSlacks ( VectorBase< R > &  vector) const

gets the vector of slack values; returns true on success

Definition at line 68 of file solbase.h.

◆ hasDualFarkas()

bool hasDualFarkas ( ) const

is a dual farkas ray available?

Definition at line 113 of file solbase.h.

◆ hasPrimalRay()

bool hasPrimalRay ( ) const

is a primal unbounded ray available?

Definition at line 76 of file solbase.h.

◆ invalidate()

void invalidate ( )

invalidate solution

Definition at line 212 of file solbase.h.

Referenced by SolBase< Rational >::SolBase().

◆ isDualFeasible()

bool isDualFeasible ( ) const

is a dual solution available?

Definition at line 91 of file solbase.h.

◆ isPrimalFeasible()

bool isPrimalFeasible ( ) const

is the stored solution primal feasible?

Definition at line 54 of file solbase.h.

◆ operator=() [1/2]

SolBase<R>& operator= ( const SolBase< R > &  sol)
private

assignment operator only for friends

Definition at line 243 of file solbase.h.

◆ operator=() [2/2]

SolBase<R>& operator= ( const SolBase< S > &  sol)
private

assignment operator only for friends

Definition at line 273 of file solbase.h.

◆ totalSizeDual()

int totalSizeDual ( const int  base = 2) const

returns total size of dual solution

Definition at line 142 of file solbase.h.

◆ totalSizePrimal()

int totalSizePrimal ( const int  base = 2) const

returns total size of primal solution

Definition at line 128 of file solbase.h.

Friends And Related Function Documentation

◆ SolBase

friend class SolBase
friend

Definition at line 50 of file solbase.h.

◆ SoPlexBase

friend class SoPlexBase
friend

Definition at line 46 of file solbase.h.

Member Data Documentation

◆ _dual

◆ _dualFarkas

◆ _hasDualFarkas

◆ _hasPrimalRay

◆ _isDualFeasible

◆ _isPrimalFeasible

◆ _objVal

R _objVal
private

Definition at line 228 of file solbase.h.

Referenced by SolBase< Rational >::operator=().

◆ _primal

◆ _primalRay

◆ _redCost

VectorBase<R> _redCost
private

◆ _slacks

VectorBase<R> _slacks
private

Definition at line 222 of file solbase.h.

Referenced by SolBase< Rational >::getSlacks(), and SolBase< Rational >::operator=().