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

List of filters for merit values. More...

#include <MeritFilterList.h>

Inherits LatBuilder::MeritFilterListPolicy< LR, ET >.

Classes

class  Seq
 Output sequence from the filters. More...
 

Public Types

typedef MeritFilterListPolicy< LR, ET > 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<LatticeType LR, EmbeddingType ET>
class LatBuilder::MeritFilterList< LR, ET >

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() .

MeritFilterList1.svg
MeritFilterList2.svg

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 LatBuilder.
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

◆ apply()

template<LatticeType LR, EmbeddingType ET>
template<class MERITSEQ >
Seq<MERITSEQ> LatBuilder::MeritFilterList< LR, ET >::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
MERITSEQType of sequence of merit values at the source of the filters.

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