LatNet Builder Manual 2.1.3-6
Software Package for Constructing Highly Uniform Point Sets
Loading...
Searching...
No Matches
NetBuilder::Task::Search< NC, ET, OBSERVER > Class Template Referenceabstract

Virtual base class for search task. More...

#include <Search.h>

Inherits NetBuilder::Task::Task.

Public Types

typedef OBSERVER< NC > Observer
 Observer of the search.
typedef boost::signals2::signal< void(const Search< NC, ET, OBSERVER > &)> OnNetSelected
 Signal emitted when a net has been selected.
typedef boost::signals2::signal< void(const Search< NC, ET, OBSERVER > &)> OnFailedSearch
 Signal emitted when the search has failed.

Public Member Functions

virtual ~Search ()=default
 Virtual default destructor.
virtual void execute () override=0
 Executes the search.
virtual void reset () override
 Resets the search.
 Search (Dimension dimension, typename NetConstructionTraits< NC >::SizeParameter sizeParameter, int verbose=0, bool earlyAbortion=false)
 Constructor.
 Search (Dimension dimension, std::unique_ptr< DigitalNet< NC > > baseNet, int verbose=0, bool earlyAbortion=false)
 Constructor.
 Search (Search &&)=default
 Default move constructor.
Dimension dimension () const
 Returns the dimension of the searched net.
unsigned int nRows () const
 Returns the number of rows of the searched generating matrices.
unsigned int nCols () const
 Returns the number of columns of the searched generating matrices.
const DigitalNet< NC > & bestNet () const
 Returns the best net found by the search.
Real bestMeritValue () const
 Returns the best merit found by the search.
bool hasFoundNet () const
virtual std::string outputNet (OutputStyle outputStyle, unsigned int interlacingFactor) const override
 Returns the best net found by the search task.
virtual std::string format () const override
 Returns information about the task.
virtual Real outputMeritValue () const override
 Returns the best merit value found by the search task.
Observerobserver ()
 Returns a reference to the minimum-element observer.
const Observerobserver () const
 Returns a const qualified reference the minimum-element observer.
OnNetSelectedonNetSelected ()
 Net-selected signal.
const OnNetSelectedonNetSelected () const
 Net-selected signal.
OnFailedSearchonFailedSearch ()
 Failed search signal.
const OnFailedSearchonFailedSearch () const
 Failed search signal.
virtual const FigureOfMerit::FigureOfMeritfigureOfMerit () const =0
 Returns a const qualified reference to the figure of merit.
const NetConstructionTraits< NC >::SizeParameter & sizeParameter () const
 Returns a const qualified reference to the size parameter of the search.

Protected Member Functions

void selectBestNet (const DigitalNet< NC > &net, Real merit)
 Selects a new best net and emits an OnNetSelected signal.

Protected Attributes

std::unique_ptr< OnNetSelectedm_onNetSelected
std::unique_ptr< OnFailedSearchm_onFailedSearch
Dimension m_dimension
NetConstructionTraits< NC >::SizeParameter m_sizeParameter
unsigned int m_nRows
unsigned int m_nCols
DigitalNet< NC > m_bestNet
Real m_bestMerit
std::unique_ptr< Observerm_observer
int m_verbose
bool m_earlyAbortion

Detailed Description

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
class NetBuilder::Task::Search< NC, ET, OBSERVER >

Virtual base class for search task.

Template Parameters
NCNet construction type (eg. SOBOL, POLYNOMIAL, LMS, EXPLICIT, ...).
ETEmbedding type (UNILEVEL or MULTILEVEL)
OBSERVERTemplate template parameter whose template parameter is a net construction type (eg. SOBOL, POLYNOMIAL, LMS, EXPLICIT, ...). Should mimick the MinimumObserver class template.

Constructor & Destructor Documentation

◆ Search() [1/3]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
NetBuilder::Task::Search< NC, ET, OBSERVER >::Search ( Dimension dimension,
typename NetConstructionTraits< NC >::SizeParameter sizeParameter,
int verbose = 0,
bool earlyAbortion = false )
inline

Constructor.

Parameters
dimensionDimension of the searched net.
sizeParameterSize parameter of the searched net.
verboseVerbosity level.
earlyAbortionEarly-abortion switch. If true, the computations will be stopped if the net is worse than the best one so far.

References dimension(), nCols(), nRows(), and sizeParameter().

Referenced by Search().

◆ Search() [2/3]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
NetBuilder::Task::Search< NC, ET, OBSERVER >::Search ( Dimension dimension,
std::unique_ptr< DigitalNet< NC > > baseNet,
int verbose = 0,
bool earlyAbortion = false )
inline

Constructor.

Parameters
dimensionDimension of the searched net.
baseNetNet from which to start the search.
verboseVerbosity level.
earlyAbortionEarly-abortion switch. If true, the computations will be stopped if the net is worse than the best one so far.

References dimension(), nCols(), nRows(), and sizeParameter().

◆ Search() [3/3]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
NetBuilder::Task::Search< NC, ET, OBSERVER >::Search ( Search< NC, ET, OBSERVER > && )
default

Default move constructor.

Deletes the implicit copy constructor.

References Search().

Member Function Documentation

◆ bestMeritValue()

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
Real NetBuilder::Task::Search< NC, ET, OBSERVER >::bestMeritValue ( ) const
inline

Returns the best merit found by the search.

``

Referenced by outputMeritValue().

◆ execute()

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
virtual void NetBuilder::Task::Search< NC, ET, OBSERVER >::execute ( )
overridepure virtual

◆ figureOfMerit()

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
virtual const FigureOfMerit::FigureOfMerit & NetBuilder::Task::Search< NC, ET, OBSERVER >::figureOfMerit ( ) const
pure virtual

◆ format()

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
virtual std::string NetBuilder::Task::Search< NC, ET, OBSERVER >::format ( ) const
inlineoverridevirtual

◆ onFailedSearch() [1/2]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
OnFailedSearch & NetBuilder::Task::Search< NC, ET, OBSERVER >::onFailedSearch ( )
inline

Failed search signal.

Emitted when no net has been selected by the search algorithm.

◆ onFailedSearch() [2/2]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
const OnFailedSearch & NetBuilder::Task::Search< NC, ET, OBSERVER >::onFailedSearch ( ) const
inline

Failed search signal.

Emitted when no net has been selected by the search algorithm.

◆ onNetSelected() [1/2]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
OnNetSelected & NetBuilder::Task::Search< NC, ET, OBSERVER >::onNetSelected ( )
inline

Net-selected signal.

Emitted when a net has been selected by the search algorithm.

Referenced by selectBestNet().

◆ onNetSelected() [2/2]

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
const OnNetSelected & NetBuilder::Task::Search< NC, ET, OBSERVER >::onNetSelected ( ) const
inline

Net-selected signal.

Emitted when a net has been selected by the search algorithm.

◆ outputMeritValue()

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
virtual Real NetBuilder::Task::Search< NC, ET, OBSERVER >::outputMeritValue ( ) const
inlineoverridevirtual

Returns the best merit value found by the search task.

Implements NetBuilder::Task::Task.

References bestMeritValue().

◆ outputNet()

template<NetConstruction NC, EmbeddingType ET, template< NetConstruction > class OBSERVER = MinimumObserver>
virtual std::string NetBuilder::Task::Search< NC, ET, OBSERVER >::outputNet ( OutputStyle outputStyle,
unsigned int interlacingFactor ) const
inlineoverridevirtual

Returns the best net found by the search task.

Implements NetBuilder::Task::Task.

References bestNet().

◆ reset()


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