Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > > Class Template Referenceabstract

#include <Function.h>

Public Types

template<std::size_t >
using Doubles = double
 
template<std::size_t >
using Vectors = std::vector< double >
 

Public Member Functions

virtual ~NAryFunctionImpl ()=default
 Default destructor.
 
virtual double operator() (Doubles< Is >... xn) const =0
 
virtual void operator() (const Vectors< Is > &... xs, std::vector< double > &output) const
 

Detailed Description

template<std::size_t... Is>
class Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > >

Definition at line 53 of file Function.h.

Member Typedef Documentation

◆ Doubles

template<std::size_t... Is>
template<std::size_t >
using Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > >::Doubles = double

Definition at line 56 of file Function.h.

◆ Vectors

template<std::size_t... Is>
template<std::size_t >
using Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > >::Vectors = std::vector<double>

Definition at line 59 of file Function.h.

Constructor & Destructor Documentation

◆ ~NAryFunctionImpl()

template<std::size_t... Is>
virtual Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > >::~NAryFunctionImpl ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ operator()() [1/2]

template<std::size_t... Is>
virtual void Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > >::operator() ( const Vectors< Is > &...  xs,
std::vector< double > &  output 
) const
inlinevirtual

Operate over a set of input vectors, output a vector. When a function is going to be evaluated over a grid, this can improve the performance since the tight loop does not need to do indireections.

Parameters
xsSet of input vectors
outputOutput vector. Concrete implementations must resize if needed.
Warning
For unary functions, xs must be sorted. This allows better performance.

Definition at line 80 of file Function.h.

References std::array< T >::size().

Here is the call graph for this function:

◆ operator()() [2/2]

template<std::size_t... Is>
virtual double Euclid::MathUtils::NAryFunctionImpl< _index_sequence< Is... > >::operator() ( Doubles< Is >...  xn) const
pure virtual

Converts the values x1,...,xm from the input domain to the output domain.

Parameters
xThe value to convert
Returns
The value of the output domain

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