LatNet Builder Manual  2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
NetBuilder::Task::MinimumObserver< NC > Class Template Reference

Observer of the best figure of merit. More...

#include <MinimumObserver.h>

Public Member Functions

 MinimumObserver (typename NetConstructionTraits< NC >::SizeParameter sizeParameter, int verbose=0)
 Constructor. More...
 
 MinimumObserver (std::unique_ptr< DigitalNetConstruction< NC >> baseNet, int verbose=0)
 Constructor. More...
 
virtual void reset (bool hard=true)
 Initializes the best observed merit value to infinity, sets the found net flag to false. More...
 
virtual void reset (std::unique_ptr< DigitalNetConstruction< NC >> baseNet)
 Initializes the best observed merit value to infinity and set the found net flag to false, and the starting net to baseNet. More...
 
const DigitalNetConstruction< NC > & bestNet ()
 Returns the best observed net.
 
Real bestMerit ()
 Returns the best observed merit value.
 
virtual bool observe (std::unique_ptr< DigitalNetConstruction< NC >> net, const Real &merit)
 Notifies the observer that the merit value of a new candidate net has been observed, updates the best observed candidate net if necessary.
 
bool hasFoundNet () const
 Returns whether the search has found a net.
 
bool onProgress (Real merit) const
 Returns whether the computation of the merit of a net should continue.
 
void onAbort (const DigitalNet &net) const
 Does nothing.
 

Detailed Description

template<NetConstruction NC>
class NetBuilder::Task::MinimumObserver< NC >

Observer of the best figure of merit.

It allows for truncating the figure if, during its term-by-term evaluation, the partial figure reaches a value superior to the current minimum value.

Examples:
tutorial/NetQuantiles.cc.

Constructor & Destructor Documentation

◆ MinimumObserver() [1/2]

template<NetConstruction NC>
NetBuilder::Task::MinimumObserver< NC >::MinimumObserver ( typename NetConstructionTraits< NC >::SizeParameter  sizeParameter,
int  verbose = 0 
)
inline

Constructor.

Parameters
sizeParameterSize parameter of the searched net.
verboseVerbosity level.

References NetBuilder::Task::MinimumObserver< NC >::reset().

◆ MinimumObserver() [2/2]

template<NetConstruction NC>
NetBuilder::Task::MinimumObserver< NC >::MinimumObserver ( std::unique_ptr< DigitalNetConstruction< NC >>  baseNet,
int  verbose = 0 
)
inline

Constructor.

Parameters
baseNetNet from which to start the search.
verboseVerbosity level.

References NetBuilder::Task::MinimumObserver< NC >::reset().

Member Function Documentation

◆ reset() [1/2]

template<NetConstruction NC>
virtual void NetBuilder::Task::MinimumObserver< NC >::reset ( bool  hard = true)
inlinevirtual

Initializes the best observed merit value to infinity, sets the found net flag to false.

Optionally, resets the starting net to the empty net.

Parameters
hardFlag indicating if the starting net must be reset to the empty net.
Examples:
tutorial/NetQuantiles.cc.

Referenced by NetBuilder::Task::MinimumObserver< NC >::MinimumObserver(), and NetBuilder::Task::MinimumObserver< NC >::reset().

◆ reset() [2/2]

template<NetConstruction NC>
virtual void NetBuilder::Task::MinimumObserver< NC >::reset ( std::unique_ptr< DigitalNetConstruction< NC >>  baseNet)
inlinevirtual

Initializes the best observed merit value to infinity and set the found net flag to false, and the starting net to baseNet.

Parameters
baseNetThe net from which the search starts.

References NetBuilder::Task::MinimumObserver< NC >::reset().


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