25#ifndef MATHUTILS_FUNCTION_H
26#define MATHUTILS_FUNCTION_H
29#include "ElementsKernel/Exception.h"
41template <
typename Seq>
55 template <std::
size_t>
58 template <std::
size_t>
82 for (
size_t i = 0; i < output.
size(); ++i) {
83 output[i] = (*this)(xs[i]...);
103template <std::
size_t N>
virtual double operator()(Doubles< Is >... xn) const =0
virtual ~NAryFunctionImpl()=default
Default destructor.
virtual void operator()(const Vectors< Is > &... xs, std::vector< double > &output) const
std::vector< double > Vectors
Interface class representing a function with an arbitrary number of parameters.
virtual std::unique_ptr< NAryFunction > clone() const =0
NAryFunction< 2 > BinaryFunction
Alias for a binary function.
NAryFunction< 3 > TernaryFunction
Alias for a ternary function.
NAryFunction< 1 > Function
Alias for an unary function.
_integer_sequence< std::size_t, Idx... > _index_sequence