14#ifndef ROOT_Math_Functor 
   15#define ROOT_Math_Functor 
   55   template <
class PtrObj, 
typename MemFn>
 
   62   Functor(std::function<
double(
double const *)> 
const& 
f, 
unsigned int dim ) : 
fDim{dim}, 
fFunc{
f} {}
 
   68   unsigned int NDim()
 const override { 
return fDim; }
 
   72   inline double DoEval (
const double * 
x)
 const override {
 
 
 
  107   template <
class PtrObj, 
typename MemFn>
 
  115   inline double DoEval (
double x)
 const override {
 
 
 
  155   template <
typename Func>
 
  162             std::enable_if_t<std::is_floating_point<
decltype((std::declval<std::remove_pointer_t<PtrObj>>().*
 
  163                                                               std::declval<DerivMemFn>())(
 
  164                                 std::declval<const double *>(), std::declval<int>()))>
::value,
 
  176      std::enable_if_t<std::is_void<
decltype((std::declval<std::remove_pointer_t<PtrObj>>().*std::declval<GradMemFn>())(
 
  177                          std::declval<const double *>(), std::declval<double *>()))>
::value,
 
  190               std::function<
double(
double const *, 
unsigned int)> 
const& 
g, 
unsigned int dim)
 
 
  204   GradFunctor(std::function<
double(
double const *)> 
const&
f, 
unsigned int dim,
 
  205               std::function<
void(
double const *, 
double *)> 
const& 
g)
 
 
  213   unsigned int NDim()
 const override { 
return fDim; }
 
  227   inline double DoEval (
const double * 
x)
 const override {
 
 
 
  278   template <
typename Func>
 
  286   template <
class PtrObj, 
typename MemFn, 
typename GradMemFn>
 
  295   GradFunctor1D(std::function<
double(
double)> 
const& 
f, std::function<
double(
double)> 
const& 
g)
 
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
Functor1D class for one-dimensional functions.
 
Functor1D()=default
Default constructor.
 
std::function< double(double)> fFunc
 
double DoEval(double x) const override
implementation of the evaluation function. Must be implemented by derived classes
 
Functor1D * Clone() const override
Clone a function.
 
Functor1D(const PtrObj &p, MemFn memFn)
 
Functor1D(std::function< double(double)> const &f)
Construct from a callable object with the right signature implementing double operator() (double x).
 
Documentation for class Functor class.
 
Functor(std::function< double(double const *)> const &f, unsigned int dim)
Construct from a callable object of multi-dimension with the right signature (implementing double ope...
 
Functor()
Default constructor.
 
std::function< double(double const *) fFunc)
 
double DoEval(const double *x) const override
Implementation of the evaluation function. Must be implemented by derived classes.
 
Functor * Clone() const override
Clone a function.
 
unsigned int NDim() const override
Retrieve the dimension of the function.
 
Functor(const PtrObj &p, MemFn memFn, unsigned int dim)
Construct from a pointer to member function (multi-dim type).
 
GradFunctor1D class for one-dimensional gradient functions.
 
GradFunctor1D(std::function< double(double)> const &f, std::function< double(double)> const &g)
Specialized constructor from 2 function objects implementing double operator()(double x).
 
GradFunctor1D * Clone() const override
Clone a function.
 
std::function< double(double)> fFunc
 
GradFunctor1D(const PtrObj &p, MemFn memFn, GradMemFn gradFn)
construct from a pointer to class and two pointers to member functions, one for the function evaluati...
 
GradFunctor1D(const Func &f)
Construct from an object with the right signature, implementing both operator() (double x) and Deriva...
 
double DoDerivative(double x) const override
Function to evaluate the derivative with respect each coordinate. To be implemented by the derived cl...
 
std::function< double(double)> fDerivFunc
 
double DoEval(double x) const override
implementation of the evaluation function. Must be implemented by derived classes
 
GradFunctor1D()=default
Default constructor.
 
GradFunctor class for Multidimensional gradient functions.
 
std::function< double(double const *, unsigned int) fDerivFunc)
 
void Gradient(const double *x, double *g) const override
 
std::function< void(const double *, double *) fGradFunc)
 
GradFunctor(const PtrObj &p, MemFn memFn, DerivMemFn gradFn, unsigned int dim)
Construct from a pointer to member function and member function types for function and derivative eva...
 
unsigned int NDim() const override
Retrieve the dimension of the function.
 
GradFunctor * Clone() const override
Clone a function.
 
double DoEval(const double *x) const override
 
GradFunctor()=default
Default constructor.
 
GradFunctor(std::function< double(double const *)> const &f, std::function< double(double const *, unsigned int)> const &g, unsigned int dim)
Construct for Gradient Functions of multi-dimension Func gives the function evaluation,...
 
GradFunctor(const PtrObj &p, MemFn memFn, GradMemFn gradFn, unsigned int dim)
Construct from a pointer to member function and member function, types for function and full derivati...
 
GradFunctor(const Func &f, unsigned int dim)
construct from a callable object of multi-dimension implementing operator()(const double *x) and Deri...
 
GradFunctor(std::function< double(double const *)> const &f, unsigned int dim, std::function< void(double const *, double *)> const &g)
Construct a new GradFunctor object using 2 std::function, one for the function evaluation and one for...
 
std::function< double(const double *) fFunc)
 
double DoDerivative(const double *x, unsigned int icoord) const override
 
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
 
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
 
virtual void Gradient(const T *x, T *grad) const
Evaluate all the vector of function derivatives (gradient) at a point x.
 
T Derivative(const T *x, unsigned int icoord=0) const
Return the partial derivative with respect to the passed coordinate.
 
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
 
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
 
const_iterator begin() const
 
const_iterator end() const
 
Namespace for new Math classes and functions.
 
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...