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< OutcomeType > | getNondomProjOutcomes () 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()
|
explicit |
Default constructor
- Parameters
-
epsilon Error value for comparisons supported Results to take non-dominated projections first First (objective) index to consider for projection second Second (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
-
lhs lhs-Projection rhs rhs-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]
Incorporates a new projection and corresponding result into non-dominated projections
- Parameters
-
proj Projection to incorporated res Corresponding 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()
|
inline |
Get projection to be investigated
- Returns
- Two-dimensional projection
Definition at line 150 of file polyscip.h.
◆ getRightProj()
|
inline |
Get right neighbour of projection to be investigated
- Returns
- Two-dimensional projection
Definition at line 156 of file polyscip.h.
◆ getLastProj()
|
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<<
|
friend |
Ostream operator
- Parameters
-
os Output stream nd_proj Non-dominated projections to write to stream
- Returns
- Output stream