SoPlex
Loading...
Searching...
No Matches
SolBase< R > Class Template Reference

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

#include <solbase.h>

Public Member Functions

 SolBase (VectorBase< R > &primal, VectorBase< R > &dual, VectorBase< R > &reducedCosts)
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() [1/2]

template<class R>
SolBase ( VectorBase< R > & primal,
VectorBase< R > & dual,
VectorBase< R > & reducedCosts )

Definition at line 63 of file solbase.h.

◆ SolBase() [2/2]

template<class R>
SolBase ( )
private

default constructor only for friends

Definition at line 252 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 186 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 172 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 214 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 200 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 135 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 113 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 98 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 76 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 121 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 84 of file solbase.h.

◆ hasDualFarkas()

template<class R>
bool hasDualFarkas ( ) const

is a dual farkas ray available?

Definition at line 129 of file solbase.h.

◆ hasPrimalRay()

template<class R>
bool hasPrimalRay ( ) const

is a primal unbounded ray available?

Definition at line 92 of file solbase.h.

◆ invalidate()

template<class R>
void invalidate ( )

invalidate solution

Definition at line 228 of file solbase.h.

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

◆ isDualFeasible()

template<class R>
bool isDualFeasible ( ) const

is a dual solution available?

Definition at line 107 of file solbase.h.

◆ isPrimalFeasible()

template<class R>
bool isPrimalFeasible ( ) const

is the stored solution primal feasible?

Definition at line 70 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 259 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 289 of file solbase.h.

◆ totalSizeDual()

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

returns total size of dual solution

Definition at line 158 of file solbase.h.

◆ totalSizePrimal()

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

returns total size of primal solution

Definition at line 144 of file solbase.h.

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

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

◆ _dualFarkas

template<class R>
VectorBase<R> _dualFarkas
private

Definition at line 242 of file solbase.h.

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

◆ _hasDualFarkas

template<class R>
unsigned int _hasDualFarkas
private

Definition at line 249 of file solbase.h.

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

◆ _hasPrimalRay

template<class R>
unsigned int _hasPrimalRay
private

Definition at line 247 of file solbase.h.

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

◆ _isDualFeasible

template<class R>
unsigned int _isDualFeasible
private

Definition at line 248 of file solbase.h.

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

◆ _isPrimalFeasible

template<class R>
unsigned int _isPrimalFeasible
private

Definition at line 246 of file solbase.h.

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

◆ _objVal

template<class R>
R _objVal
private

Definition at line 244 of file solbase.h.

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

◆ _primal

template<class R>
VectorBase<R> _primal
private

Definition at line 237 of file solbase.h.

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

◆ _primalRay

template<class R>
VectorBase<R> _primalRay
private

Definition at line 239 of file solbase.h.

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

◆ _redCost

template<class R>
VectorBase<R> _redCost
private

Definition at line 241 of file solbase.h.

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

◆ _slacks

template<class R>
VectorBase<R> _slacks
private

Definition at line 238 of file solbase.h.

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