Lattice Builder Manual Software Package for Constructing Rank-1 Lattices

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Types | Public Member Functions | List of all members
LatBuilder::MeritFilter< LAT > Class Template Reference

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

## Detailed Description

### template<LatType LAT>
class LatBuilder::MeritFilter< LAT >

Generic filter wrapper for merit values.

Template Parameters

  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.

## Member Typedef Documentation

template<LatType LAT>

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.

## Constructor & Destructor Documentation

template<LatType LAT>

LatBuilder::MeritFilter< LAT >::MeritFilter | ( | Filter | filter,
|  | std::string | name = `"<unknown filter>"`
| ) |  |
| inline

Constructor.

Parameters

  filter | Filter callable.
  name | Description string for the filter.

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

- latbuilder/include/latbuilder/MeritFilter.h