LatNet Builder Manual  2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
LatBuilder::Kernel::FunctorAdaptor< FUNCTOR > Class Template Reference

Generic kernel for functors. More...

#include <FunctorAdaptor.h>

Inherits LatBuilder::Kernel::Base< FunctorAdaptor< FUNCTOR > >.

Public Types

typedef FUNCTOR Functor
 

Public Member Functions

 FunctorAdaptor (Functor functor=Functor())
 Constructor.
 
template<LatticeType LR, EmbeddingType L, Compress C, PerLevelOrder P>
RealVector valuesVector (const Storage< LR, L, C, P > &storage) const
 Creates a new vector of kernel values. More...
 
bool symmetric () const
 Returns true if the kernel takes the same value at points \(x\) and \(1 - x\) for \(x \in [0,1)\).
 
std::string name () const
 Returns the name of the kernel.
 
- Public Member Functions inherited from LatBuilder::Kernel::Base< FunctorAdaptor< FUNCTOR > >
RealVector valuesVector (const Storage< LR, L, C, P > &storage) const
 Creates a new vector of kernel values. More...
 
bool symmetric () const
 Returns true if the kernel takes the same value at points \(x\) and \(1 - x\) for \(x \in [0,1)\).
 
std::string name () const
 Returns the name of the kernel.
 
FunctorAdaptor< FUNCTOR > & derived ()
 
const FunctorAdaptor< FUNCTOR > & derived () const
 

Static Public Member Functions

static constexpr Compress suggestedCompression ()
 

Protected Member Functions

const Functor & functor () const
 

Detailed Description

template<typename FUNCTOR>
class LatBuilder::Kernel::FunctorAdaptor< FUNCTOR >

Generic kernel for functors.

This class allows for polymorphism while inlining the functor calls in the loop that initializes new vectors.

Template Parameters
FUNCTORType of functor.

Member Function Documentation

◆ valuesVector()

template<typename FUNCTOR>
template<LatticeType LR, EmbeddingType L, Compress C, PerLevelOrder P>
RealVector LatBuilder::Kernel::FunctorAdaptor< FUNCTOR >::valuesVector ( const Storage< LR, L, C, P > &  storage) const
inline

Creates a new vector of kernel values.

The values of the kernel evaluated at sizeParam.numPoints() regular intervals in \([0,1)\) are stored in a linear vector. The intervals are of size 1/sizeParam.numPoints() and the first point is at 0.

Returns
The newly created vector.

The \(i^{\text{th}}\) element \(\omega_i\) is:

  • \(\omega(i/n)\) in the case of an ordinary lattice with modulus \(n\).
  • \(\omega((\nu_m(\frac{i(z)}{P(z)}))\) in the case of a polynomial lattice of modulus \(P(z)\) ( \( i(z) = \sum a_iz^i\) where \(i =\sum a_i2^i\)).

    Remarks
    Checks that the functor and the compression are compatible, or throws a std::logic_error.

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