Lattice Builder Manual
Software Package for Constructing Rank-1 Lattices
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<LatType L, Compress C>
RealVector valuesVector (const Storage< L, C > &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< L, C > &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

template<typename FUNCTOR>
template<LatType L, Compress C>
RealVector LatBuilder::Kernel::FunctorAdaptor< FUNCTOR >::valuesVector ( const Storage< L, C > &  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.
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: