Lattice Builder Manual
Software Package for Constructing Rank-1 Lattices
|
Generic filter wrapper for merit values. More...
#include <MeritFilter.h>
Inherits LatBuilder::BasicMeritFilter< LAT >.
Public Types | |
typedef BasicMeritFilter< LAT >::InputMeritValue | MeritValue |
typedef BasicMeritFilter< LAT >::LatDef | LatDef |
typedef std::function< bool(Real &)> | Filter |
Filter function type. More... | |
Public Types inherited from LatBuilder::BasicMeritFilter< LAT > | |
typedef MeritFilterTraits< LAT >::MeritValue | InputMeritValue |
typedef MeritFilterTraits< OUT >::MeritValue | OutputMeritValue |
typedef LatBuilder::LatDef< LAT > | 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< LAT > | |
virtual OutputMeritValue | operator() (const InputMeritValue &, const LatDef &) const =0 |
Generic filter wrapper for merit values.
MERIT | Type 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.
typedef std::function<bool (Real&)> LatBuilder::MeritFilter< LAT >::Filter |
Filter function type.
Expected to return true
if and only if the merit value is accepted.
|
inline |
Constructor.
filter | Filter callable. |
name | Description string for the filter. |