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
Classes | Public Types | Public Member Functions | List of all members
LatBuilder::MeritFilterList< LAT > Class Template Reference

List of filters for merit values. More...

`#include <MeritFilterList.h>`

Inherits LatBuilder::MeritFilterListPolicy< LAT >.

## Classes
class | Seq
| Output sequence from the filters. More...

## Public Types
typedef MeritFilterListPolicy < LAT > | Policy

## Public Member Functions
template<class MERITSEQ >
Seq< MERITSEQ > | apply (MERITSEQ meritSeq) const
| Applies the filters to the input sequence `meritSeq` of merit values. More...

## Detailed Description

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

List of filters for merit values.

Transforms sequences of merit values element by element. Consits of a stack of filters, applied sequentially to each merit value.

Processes merit values received from its input and produces filtered merit values from its output.

The implementation for scalar merit values simply passes through a chain of filters.

The implementation for multilevel merit values first pass through a chain of embedded merit filters. Next, it is converted to simple merit values using a combiner. Then, it passes through a chain of simple merit filters, before it reaches the output.

When a candidate lattice is rejected by a filter, the MeritFilterList::onReject() signal is emitted, no further (downstream) filters are applied and the returned merit value is `std::numeric_limits<Real>::infinity()` .

A filter should return `true` when it accepts a value, or `false` if it rejects it.

Remarks
  An alternative, and possibly simpler, approach to filters would be to implement each transformation as a distinct bridge sequence. However, the stacking of transformations would increase the number of indirections. Moreover, the number of bridge sequences stacked over the original sequence of merit values would be unpredictable, so pieces of code that work on sequences of merit values but need to access the original sequence by calling the member function `base()` would not know in advance how many times to call `base()` to trace back the original sequence. These are the main reasons why there are filters in Lattice Builder.

Examples:
  tutorial/FilteredCBC.cc, tutorial/FilteredRCBC.cc, tutorial/MeritSeqCBC.cc, tutorial/MeritSeqCBCSignals.cc, tutorial/MeritSeqCoordUniform.cc, tutorial/MeritSeqFastCBC.cc, and tutorial/MeritSeqNonCBC.cc.

## Member Function Documentation

template<LatType LAT>
template<class MERITSEQ >

Seq<MERITSEQ> LatBuilder::MeritFilterList< LAT >::apply | ( | MERITSEQ | meritSeq | ) | const
| inline

Applies the filters to the input sequence `meritSeq` of merit values.

Returns
  A new sequence based on this filters with `meritSeq` as its input.

Template Parameters

  MERITSEQ | Type of sequence of merit values at the source of the filters.

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

- latbuilder/include/latbuilder/MeritFilterList.h