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 getPrimal (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 getPrimalRay (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 getDual (VectorBase< R > &vector) const
 gets the dual solution vector; returns true on success More...
 
bool getRedCost (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 getDualFarkas (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

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

Friends

class SoPlex
 
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 233 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 167 of file solbase.h.

Referenced by SoPlex::dlcmSizeDualRational().

◆ dlcmSizePrimal()

int dlcmSizePrimal ( const int  base = 2) const

returns size of least common multiple of denominators in primal solution

Definition at line 153 of file solbase.h.

Referenced by SoPlex::dlcmSizePrimalRational().

◆ dmaxSizeDual()

int dmaxSizeDual ( const int  base = 2) const

returns size of largest denominator in dual solution

Definition at line 195 of file solbase.h.

Referenced by SoPlex::dmaxSizeDualRational().

◆ dmaxSizePrimal()

int dmaxSizePrimal ( const int  base = 2) const

returns size of largest denominator in primal solution

Definition at line 181 of file solbase.h.

Referenced by SoPlex::dmaxSizePrimalRational().

◆ getDual()

bool getDual ( VectorBase< R > &  vector) const

gets the dual solution vector; returns true on success

Definition at line 94 of file solbase.h.

Referenced by SoPlex::getDualRational(), SoPlex::getDualReal(), and soplex::reconstructSol().

◆ getDualFarkas()

bool getDualFarkas ( VectorBase< R > &  vector) const

gets the Farkas proof if available; returns true on success

Definition at line 116 of file solbase.h.

Referenced by SoPlex::getDualFarkasRational(), and SoPlex::getDualFarkasReal().

◆ getPrimal()

bool getPrimal ( VectorBase< R > &  vector) const

gets the primal solution vector; returns true on success

Definition at line 57 of file solbase.h.

Referenced by SoPlex::getPrimalRational(), SoPlex::getPrimalReal(), and soplex::reconstructSol().

◆ getPrimalRay()

bool getPrimalRay ( VectorBase< R > &  vector) const

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

Definition at line 79 of file solbase.h.

Referenced by SoPlex::getPrimalRayRational(), and SoPlex::getPrimalRayReal().

◆ getRedCost()

bool getRedCost ( VectorBase< R > &  vector) const

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

Definition at line 102 of file solbase.h.

Referenced by SoPlex::getRedCostRational(), and SoPlex::getRedCostReal().

◆ getSlacks()

bool getSlacks ( VectorBase< R > &  vector) const

gets the vector of slack values; returns true on success

Definition at line 65 of file solbase.h.

Referenced by SoPlex::getSlacksRational(), SoPlex::getSlacksReal(), and soplex::reconstructSol().

◆ hasDualFarkas()

bool hasDualFarkas ( ) const

is a dual farkas ray available?

Definition at line 110 of file solbase.h.

Referenced by SoPlex::_computeInfeasBox(), SoPlex::_project(), SoPlex::_unscaleSolutionReal(), and SoPlex::hasDualFarkas().

◆ hasPrimalRay()

bool hasPrimalRay ( ) const

is a primal unbounded ray available?

Definition at line 73 of file solbase.h.

Referenced by SoPlex::_optimizeRational(), SoPlex::_project(), SoPlex::_unscaleSolutionReal(), SoPlex::_untransformEquality(), and SoPlex::hasPrimalRay().

◆ invalidate()

◆ isDualFeasible()

bool isDualFeasible ( ) const

◆ isPrimalFeasible()

bool isPrimalFeasible ( ) const

◆ operator=() [1/2]

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

assignment operator only for friends

Definition at line 240 of file solbase.h.

◆ operator=() [2/2]

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

assignment operator only for friends

Definition at line 270 of file solbase.h.

◆ totalSizeDual()

int totalSizeDual ( const int  base = 2) const

returns total size of dual solution

Definition at line 139 of file solbase.h.

Referenced by SoPlex::totalSizeDualRational().

◆ totalSizePrimal()

int totalSizePrimal ( const int  base = 2) const

returns total size of primal solution

Definition at line 125 of file solbase.h.

Referenced by SoPlex::totalSizePrimalRational().

Friends And Related Function Documentation

◆ SolBase

friend class SolBase
friend

Definition at line 47 of file solbase.h.

◆ SoPlex

friend class SoPlex
friend

Definition at line 46 of file solbase.h.

Member Data Documentation

◆ _dual

◆ _dualFarkas

◆ _hasDualFarkas

◆ _hasPrimalRay

◆ _isDualFeasible

◆ _isPrimalFeasible

◆ _objVal

◆ _primal

◆ _primalRay

◆ _redCost

◆ _slacks