Scippy

SCIP

Solving Constraint Integer Programs

polyscip::NondomProjections Class Reference

Detailed Description

Class representing non-dominated projections.

Definition at line 89 of file polyscip.h.

Class representing non-dominated projections. More...

#include <polyscip.h>

Public Types

using ProjMap = std::map< TwoDProj, ResultContainer, std::function< bool(const TwoDProj &, const TwoDProj &)> >
 Container for non-dominated projections. More...
 

Public Member Functions

 NondomProjections (double epsilon, const ResultContainer &supported, std::size_t first, std::size_t second)
 
bool epsilonDominates (const TwoDProj &lhs, const TwoDProj &rhs) const
 
bool finished () const
 
void update ()
 
void update (TwoDProj proj, Result res)
 
std::vector< OutcomeTypegetNondomProjOutcomes () const
 
TwoDProj getLeftProj () const
 
TwoDProj getRightProj () const
 
TwoDProj getLastProj () const
 

Friends

std::ostream & operator<< (std::ostream &os, const NondomProjections &nd_proj)
 

Member Typedef Documentation

◆ ProjMap

using polyscip::NondomProjections::ProjMap = std::map<TwoDProj, ResultContainer, std::function<bool(const TwoDProj&, const TwoDProj&)> >

Container for non-dominated projections.

Definition at line 91 of file polyscip.h.

Constructor & Destructor Documentation

◆ NondomProjections()

polyscip::NondomProjections::NondomProjections ( double  epsilon,
const ResultContainer supported,
std::size_t  first,
std::size_t  second 
)
explicit

Default constructor

Parameters
epsilonError value for comparisons
supportedResults to take non-dominated projections
firstFirst (objective) index to consider for projection
secondSecond (objective) index to consider for projection

Definition at line 134 of file polyscip.cpp.

References epsilonDominates().

Member Function Documentation

◆ epsilonDominates()

bool polyscip::NondomProjections::epsilonDominates ( const TwoDProj lhs,
const TwoDProj rhs 
) const

lhs-Projection epsilonDominates rhs-Projection if lhs.first - epsilon < rhs.first && lhs.second - epsilon < rhs.second

Parameters
lhslhs-Projection
rhsrhs-Projection
Returns
true if lhs-Projection epsilon-dominated rhs-Projection; false otherwise

Definition at line 174 of file polyscip.cpp.

References polyscip::TwoDProj::getFirst(), and polyscip::TwoDProj::getSecond().

Referenced by NondomProjections(), and update().

◆ finished()

bool polyscip::NondomProjections::finished ( ) const

Indicates that all stored projections are investigated

Returns
true if all stored projections have been investigated; false otherwise

Definition at line 221 of file polyscip.cpp.

◆ update() [1/2]

void polyscip::NondomProjections::update ( )

Advances current_ iterator

Definition at line 181 of file polyscip.cpp.

◆ update() [2/2]

void polyscip::NondomProjections::update ( TwoDProj  proj,
Result  res 
)

Incorporates a new projection and corresponding result into non-dominated projections

Parameters
projProjection to incorporated
resCorresponding result of projection

Definition at line 191 of file polyscip.cpp.

References epsilonDominates().

◆ getNondomProjOutcomes()

vector< OutcomeType > polyscip::NondomProjections::getNondomProjOutcomes ( ) const

Get outcomes corresponding to non-dominated projections

Returns
Vector of outcomes corresponding to non-dominated projections

Definition at line 208 of file polyscip.cpp.

◆ getLeftProj()

TwoDProj polyscip::NondomProjections::getLeftProj ( ) const
inline

Get projection to be investigated

Returns
Two-dimensional projection

Definition at line 150 of file polyscip.h.

◆ getRightProj()

TwoDProj polyscip::NondomProjections::getRightProj ( ) const
inline

Get right neighbour of projection to be investigated

Returns
Two-dimensional projection

Definition at line 156 of file polyscip.h.

◆ getLastProj()

TwoDProj polyscip::NondomProjections::getLastProj ( ) const
inline

Get projection with maximal value for second index

Returns
Two-dimensional projection

Definition at line 162 of file polyscip.h.

Referenced by polyscip::Polyscip::computeNondomPoints().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const NondomProjections nd_proj 
)
friend

Ostream operator

Parameters
osOutput stream
nd_projNon-dominated projections to write to stream
Returns
Output stream