shark::HypervolumeContribution Struct Reference

Frontend for hypervolume contribution algorithms in m dimensions. More...

#include <shark/Algorithms/DirectSearch/Operators/Hypervolume/HypervolumeContribution.h>

Public Member Functions

 HypervolumeContribution ()
 Default c'tor. More...
 
void useApproximation (bool useApproximation)
 True if the hypervolume approximation is to be used in dimensions > 3. More...
 
double approximationEpsilon () const
 
double & approximationEpsilon ()
 
double approximationDelta () const
 
double & approximationDelta ()
 
template<typename Archive >
void serialize (Archive &archive, const unsigned int version)
 
template<class Set , typename VectorType >
std::vector< KeyValuePair< double, std::size_t > > smallest (Set const &points, std::size_t k, VectorType const &ref) const
 Returns the index of the points with smallest contribution as well as their contribution. More...
 
template<class Set , typename VectorType >
std::vector< KeyValuePair< double, std::size_t > > largest (Set const &points, std::size_t k, VectorType const &ref) const
 Returns the index of the points with largest contribution as well as their contribution. More...
 
template<class Set >
std::vector< KeyValuePair< double, std::size_t > > smallest (Set const &points, std::size_t k) const
 Returns the index of the points with smallest contribution as well as their contribution. More...
 
template<class Set >
std::vector< KeyValuePair< double, std::size_t > > largest (Set const &points, std::size_t k) const
 Returns the index of the points with largest contribution as well as their contribution. More...
 

Detailed Description

Frontend for hypervolume contribution algorithms in m dimensions.

Depending on the dimensionality of the problem, one of the specialized algorithms is called. For large dimensionalities for which there are no specialized fast algorithms, the exponential time algorithm is called. Also a log-transformation of points is supported

Definition at line 47 of file HypervolumeContribution.h.

Constructor & Destructor Documentation

◆ HypervolumeContribution()

shark::HypervolumeContribution::HypervolumeContribution ( )
inline

Default c'tor.

Definition at line 50 of file HypervolumeContribution.h.

Member Function Documentation

◆ approximationDelta() [1/2]

double shark::HypervolumeContribution::approximationDelta ( ) const
inline

◆ approximationDelta() [2/2]

double& shark::HypervolumeContribution::approximationDelta ( )
inline

◆ approximationEpsilon() [1/2]

double shark::HypervolumeContribution::approximationEpsilon ( ) const
inline

◆ approximationEpsilon() [2/2]

double& shark::HypervolumeContribution::approximationEpsilon ( )
inline

◆ largest() [1/2]

template<class Set , typename VectorType >
std::vector<KeyValuePair<double,std::size_t> > shark::HypervolumeContribution::largest ( Set const &  points,
std::size_t  k,
VectorType const &  ref 
) const
inline

Returns the index of the points with largest contribution as well as their contribution.

Parameters
[in]pointsThe set \(S\) of points from which to select the largest contributor.
[in]referencePointThe reference Point \(\vec{r} \in \mathbb{R}^2\) for the hypervolume calculation, needs to fulfill: \( \forall s \in S: s \preceq \vec{r}\).

Definition at line 107 of file HypervolumeContribution.h.

References shark::HypervolumeContributionMD::largest(), shark::HypervolumeContribution2D::largest(), shark::HypervolumeContribution3D::largest(), SHARK_RUNTIME_CHECK, and SIZE_CHECK.

◆ largest() [2/2]

template<class Set >
std::vector<KeyValuePair<double,std::size_t> > shark::HypervolumeContribution::largest ( Set const &  points,
std::size_t  k 
) const
inline

Returns the index of the points with largest contribution as well as their contribution.

As no reference point is given, the extremum points can not be computed and are never selected.

Parameters
[in]pointsThe set \(S\) of points from which to select the smallest contributor.
[in]referencePointThe reference Point \(\vec{r} \in \mathbb{R}^2\) for the hypervolume calculation, needs to fulfill: \( \forall s \in S: s \preceq \vec{r}\).

Definition at line 156 of file HypervolumeContribution.h.

References shark::HypervolumeContributionMD::largest(), shark::HypervolumeContribution2D::largest(), shark::HypervolumeContribution3D::largest(), and SHARK_RUNTIME_CHECK.

◆ serialize()

template<typename Archive >
void shark::HypervolumeContribution::serialize ( Archive &  archive,
const unsigned int  version 
)
inline

Definition at line 73 of file HypervolumeContribution.h.

◆ smallest() [1/2]

template<class Set , typename VectorType >
std::vector<KeyValuePair<double,std::size_t> > shark::HypervolumeContribution::smallest ( Set const &  points,
std::size_t  k,
VectorType const &  ref 
) const
inline

Returns the index of the points with smallest contribution as well as their contribution.

Parameters
[in]pointsThe set \(S\) of points from which to select the smallest contributor.
[in]kThe number of points to select.
[in]referencePointThe reference Point \(\vec{r} \in \mathbb{R}^2\) for the hypervolume calculation, needs to fulfill: \( \forall s \in S: s \preceq \vec{r}\).

Definition at line 84 of file HypervolumeContribution.h.

References SHARK_RUNTIME_CHECK, SIZE_CHECK, shark::HypervolumeContributionMD::smallest(), shark::HypervolumeContribution2D::smallest(), shark::HypervolumeContributionApproximator::smallest(), and shark::HypervolumeContribution3D::smallest().

Referenced by shark::HypervolumeIndicator::leastContributor().

◆ smallest() [2/2]

template<class Set >
std::vector<KeyValuePair<double,std::size_t> > shark::HypervolumeContribution::smallest ( Set const &  points,
std::size_t  k 
) const
inline

Returns the index of the points with smallest contribution as well as their contribution.

As no reference point is given, the extremum points can not be computed and are never selected.

Parameters
[in]pointsThe set \(S\) of points from which to select the smallest contributor.
[in]kThe number of points to select.
[in]referencePointThe reference Point \(\vec{r} \in \mathbb{R}^2\) for the hypervolume calculation, needs to fulfill: \( \forall s \in S: s \preceq \vec{r}\).

Definition at line 132 of file HypervolumeContribution.h.

References SHARK_RUNTIME_CHECK, shark::HypervolumeContributionMD::smallest(), shark::HypervolumeContribution2D::smallest(), shark::HypervolumeContributionApproximator::smallest(), and shark::HypervolumeContribution3D::smallest().

◆ useApproximation()

void shark::HypervolumeContribution::useApproximation ( bool  useApproximation)
inline

True if the hypervolume approximation is to be used in dimensions > 3.

Definition at line 53 of file HypervolumeContribution.h.

Referenced by shark::HypervolumeIndicator::useApproximation().


The documentation for this struct was generated from the following file: