Lattice Builder Manual
Software Package for Constructing Rank-1 Lattices
LatBuilder::MeritFilterList< LAT > Class Template Reference

List of filters for merit values. More...

#include <MeritFilterList.h>

Inherits LatBuilder::MeritFilterListPolicy< LAT >.


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.

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.
tutorial/, tutorial/, tutorial/, tutorial/, tutorial/, tutorial/, and tutorial/

Member Function Documentation

template<LatType LAT>
template<class MERITSEQ >
Seq<MERITSEQ> LatBuilder::MeritFilterList< LAT >::apply ( MERITSEQ  meritSeq) const

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

A new sequence based on this filters with meritSeq as its input.
Template Parameters
MERITSEQType of sequence of merit values at the source of the filters.

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