LatNet Builder Manual 2.1.3-6
Software Package for Constructing Highly Uniform Point Sets
Loading...
Searching...
No Matches
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.
 MinimumObserver (std::unique_ptr< DigitalNet< NC > > baseNet, int verbose=0)
 Constructor.
virtual void reset (bool hard=true)
 Initializes the best observed merit value to infinity, sets the found net flag to false.
virtual void reset (std::unique_ptr< DigitalNet< NC > > baseNet)
 Initializes the best observed merit value to infinity and set the found net flag to false, and the starting net to baseNet.
const DigitalNet< NC > & bestNet ()
 Returns the best observed net.
Real bestMerit ()
 Returns the best observed merit value.
virtual bool observe (std::unique_ptr< DigitalNet< 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 AbstractDigitalNet &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 reset().

◆ MinimumObserver() [2/2]

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

Constructor.

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

References 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 MinimumObserver(), MinimumObserver(), and reset().

◆ reset() [2/2]

template<NetConstruction NC>
virtual void NetBuilder::Task::MinimumObserver< NC >::reset ( std::unique_ptr< DigitalNet< 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 reset().


The documentation for this class was generated from the following file:
  • include/netbuilder/Task/MinimumObserver.h