SoPlex Documentation
Loading...
Searching...
No Matches

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

Private Member Functions

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

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 52 of file solbase.h.

Constructor & Destructor Documentation

◆ SolBase()

template<class R>
SolBase ( )
private

default constructor only for friends

Definition at line 244 of file solbase.h.

Member Function Documentation

◆ dlcmSizeDual()

template<class R>
int dlcmSizeDual ( const int base = 2) const

returns size of least common multiple of denominators in dual solution

Definition at line 178 of file solbase.h.

◆ dlcmSizePrimal()

template<class R>
int dlcmSizePrimal ( const int base = 2) const

returns size of least common multiple of denominators in primal solution

Definition at line 164 of file solbase.h.

◆ dmaxSizeDual()

template<class R>
int dmaxSizeDual ( const int base = 2) const

returns size of largest denominator in dual solution

Definition at line 206 of file solbase.h.

◆ dmaxSizePrimal()

template<class R>
int dmaxSizePrimal ( const int base = 2) const

returns size of largest denominator in primal solution

Definition at line 192 of file solbase.h.

◆ getDualFarkasSol()

template<class R>
bool getDualFarkasSol ( VectorBase< R > & vector) const

gets the Farkas proof if available; returns true on success

Definition at line 127 of file solbase.h.

◆ getDualSol()

template<class R>
bool getDualSol ( VectorBase< R > & vector) const

gets the dual solution vector; returns true on success

Definition at line 105 of file solbase.h.

◆ getPrimalRaySol()

template<class R>
bool getPrimalRaySol ( VectorBase< R > & vector) const

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

Definition at line 90 of file solbase.h.

◆ getPrimalSol()

template<class R>
bool getPrimalSol ( VectorBase< R > & vector) const

gets the primal solution vector; returns true on success

Definition at line 68 of file solbase.h.

◆ getRedCostSol()

template<class R>
bool getRedCostSol ( VectorBase< R > & vector) const

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

Definition at line 113 of file solbase.h.

◆ getSlacks()

template<class R>
bool getSlacks ( VectorBase< R > & vector) const

gets the vector of slack values; returns true on success

Definition at line 76 of file solbase.h.

◆ hasDualFarkas()

template<class R>
bool hasDualFarkas ( ) const

is a dual farkas ray available?

Definition at line 121 of file solbase.h.

◆ hasPrimalRay()

template<class R>
bool hasPrimalRay ( ) const

is a primal unbounded ray available?

Definition at line 84 of file solbase.h.

◆ invalidate()

template<class R>
void invalidate ( )

invalidate solution

Definition at line 220 of file solbase.h.

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

◆ isDualFeasible()

template<class R>
bool isDualFeasible ( ) const

is a dual solution available?

Definition at line 99 of file solbase.h.

◆ isPrimalFeasible()

template<class R>
bool isPrimalFeasible ( ) const

is the stored solution primal feasible?

Definition at line 62 of file solbase.h.

◆ operator=() [1/2]

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

assignment operator only for friends

Definition at line 251 of file solbase.h.

◆ operator=() [2/2]

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

assignment operator only for friends

Definition at line 281 of file solbase.h.

◆ totalSizeDual()

template<class R>
int totalSizeDual ( const int base = 2) const

returns total size of dual solution

Definition at line 150 of file solbase.h.

◆ totalSizePrimal()

template<class R>
int totalSizePrimal ( const int base = 2) const

returns total size of primal solution

Definition at line 136 of file solbase.h.

Friends And Related Symbol Documentation

◆ SolBase

template<class R>
template<class S>
friend class SolBase
friend

Definition at line 58 of file solbase.h.

◆ SoPlexBase

template<class R>
template<class T>
friend class SoPlexBase
friend

Definition at line 54 of file solbase.h.

Member Data Documentation

◆ _dual

template<class R>
VectorBase<R> _dual
private

Definition at line 232 of file solbase.h.

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

◆ _dualFarkas

template<class R>
VectorBase<R> _dualFarkas
private

Definition at line 234 of file solbase.h.

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

◆ _hasDualFarkas

template<class R>
unsigned int _hasDualFarkas
private

Definition at line 241 of file solbase.h.

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

◆ _hasPrimalRay

template<class R>
unsigned int _hasPrimalRay
private

Definition at line 239 of file solbase.h.

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

◆ _isDualFeasible

template<class R>
unsigned int _isDualFeasible
private

Definition at line 240 of file solbase.h.

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

◆ _isPrimalFeasible

template<class R>
unsigned int _isPrimalFeasible
private

Definition at line 238 of file solbase.h.

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

◆ _objVal

template<class R>
R _objVal
private

Definition at line 236 of file solbase.h.

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

◆ _primal

template<class R>
VectorBase<R> _primal
private

Definition at line 229 of file solbase.h.

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

◆ _primalRay

template<class R>
VectorBase<R> _primalRay
private

Definition at line 231 of file solbase.h.

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

◆ _redCost

template<class R>
VectorBase<R> _redCost
private

Definition at line 233 of file solbase.h.

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

◆ _slacks

template<class R>
VectorBase<R> _slacks
private

Definition at line 230 of file solbase.h.

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