BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
RootScalarFunction Class Reference

Description

The chi2 function for use in minimizers.

Definition at line 36 of file RootScalarFunction.h.

Inheritance diagram for RootScalarFunction:
[legend]
Collaboration diagram for RootScalarFunction:
[legend]

Public Types

typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 
typedef FunctorImpl< IBaseFunctionMultiDim > Impl
 
typedef IBaseFunctionMultiDim::BaseFunc ImplBase
 

Public Member Functions

 RootScalarFunction (root_scalar_t fcn, int ndims)
 
ImplBaseClone () const
 
unsigned int NDim () const
 
operator() (const T *x) const
 

Private Member Functions

double DoEval (const double *x) const
 

Private Attributes

std::unique_ptr< ImplfImpl
 

Member Typedef Documentation

◆ BackendType

template<class T >
typedef T ROOT::Math::IBaseFunctionMultiDimTempl< T >::BackendType
inherited

Definition at line 66 of file IFunction.h.

◆ BaseFunc

template<class T >
typedef IBaseFunctionMultiDimTempl<T> ROOT::Math::IBaseFunctionMultiDimTempl< T >::BaseFunc
inherited

Definition at line 67 of file IFunction.h.

◆ Impl

typedef FunctorImpl<IBaseFunctionMultiDim> ROOT::Math::Functor::Impl
inherited

Definition at line 397 of file Functor.h.

◆ ImplBase

typedef IBaseFunctionMultiDim::BaseFunc ROOT::Math::Functor::ImplBase
inherited

Definition at line 398 of file Functor.h.

Constructor & Destructor Documentation

◆ RootScalarFunction()

RootScalarFunction::RootScalarFunction ( root_scalar_t  fcn,
int  ndims 
)

Definition at line 17 of file RootScalarFunction.cpp.

18  : ROOT::Math::Functor(fcn, static_cast<unsigned int>(ndims))
19 {
20 }

Member Function Documentation

◆ Clone()

ImplBase* ROOT::Math::Functor::Clone ( ) const
inlinevirtualinherited

Clone a function. Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 454 of file Functor.h.

454 { return new Functor(*this); }

References ROOT::Math::Functor::Functor().

Here is the call graph for this function:

◆ DoEval()

double ROOT::Math::Functor::DoEval ( const double *  x) const
inlineprivateinherited

Definition at line 462 of file Functor.h.

462  {
463  return (*fImpl)(x);
464  }
std::unique_ptr< Impl > fImpl
Definition: Functor.h:467

References ROOT::Math::Functor::fImpl.

◆ NDim()

unsigned int ROOT::Math::Functor::NDim ( ) const
inlinevirtualinherited

Retrieve the dimension of the function

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 457 of file Functor.h.

457 { return fImpl->NDim(); }

References ROOT::Math::Functor::fImpl.

◆ operator()()

template<class T >
T ROOT::Math::IBaseFunctionMultiDimTempl< T >::operator() ( const T *  x) const
inlineinherited

Evaluate the function at a point x[]. Use the pure virtual private method DoEval which must be implemented by the sub-classes

Definition at line 92 of file IFunction.h.

93  {
94  return DoEval(x);
95  }
virtual T DoEval(const T *x) const =0

References ROOT::Math::IBaseFunctionMultiDimTempl< T >::DoEval().

Referenced by ROOT::Math::IGradientFunctionMultiDimTempl< T >::FdF().

Here is the call graph for this function:

Member Data Documentation

◆ fImpl

std::unique_ptr<Impl> ROOT::Math::Functor::fImpl
privateinherited

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