LatNet Builder Manual  2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
LatBuilder::MeritFilter< LR, ET > Class Template Reference

Generic filter wrapper for merit values. More...

#include <MeritFilter.h>

Inherits LatBuilder::BasicMeritFilter< LR, ET >.

Public Types

typedef BasicMeritFilter< LR, ET >::InputMeritValue MeritValue
 
typedef BasicMeritFilter< LR, ET >::LatDef LatDef
 
typedef std::function< bool(Real &)> Filter
 Filter function type. More...
 
- Public Types inherited from LatBuilder::BasicMeritFilter< LR, ET >
typedef MeritFilterTraits< ET >::MeritValue InputMeritValue
 
typedef MeritFilterTraits< OUT >::MeritValue OutputMeritValue
 
typedef LatBuilder::LatDef< LR, ET > LatDef
 

Public Member Functions

 MeritFilter (Filter filter, std::string name="<unknown filter>")
 Constructor. More...
 
MeritValue operator() (const MeritValue &merit, const LatDef &lat) const
 Filters the merit value merit.
 
std::string name () const
 
- Public Member Functions inherited from LatBuilder::BasicMeritFilter< LR, ET >
virtual OutputMeritValue operator() (const InputMeritValue &, const LatDef &) const=0
 

Detailed Description

template<LatticeType LR, EmbeddingType ET>
class LatBuilder::MeritFilter< LR, ET >

Generic filter wrapper for merit values.

Template Parameters
MERITType of merit value.

For embedded lattices, the filter is applied to each per-level merit value independently. For ordinary lattices, the filer is applied to the single merit value.

This class template is useful to reuse the same code to apply the filter to a single merit value or to embedded merit values.

Member Typedef Documentation

◆ Filter

template<LatticeType LR, EmbeddingType ET>
typedef std::function<bool (Real&)> LatBuilder::MeritFilter< LR, ET >::Filter

Filter function type.

Expected to return true if and only if the merit value is accepted.

Constructor & Destructor Documentation

◆ MeritFilter()

template<LatticeType LR, EmbeddingType ET>
LatBuilder::MeritFilter< LR, ET >::MeritFilter ( Filter  filter,
std::string  name = "<unknown filter>" 
)
inline

Constructor.

Parameters
filterFilter callable.
nameDescription string for the filter.

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