Jpp  master_rocky
the software that should make you happy
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
JFIT::JAbstractRegressor< JModel_t, JMinimiser_t > Struct Template Reference

Abstract class for global fit method. More...

#include <JRegressor.hh>

Inheritance diagram for JFIT::JAbstractRegressor< JModel_t, JMinimiser_t >:
JFIT::JAbstractMinimiser< JModel_t > JEEP::JMessage< T >

Public Types

typedef JMinimiser_t< JModel_t > minimiser_type
 
typedef JRegressor< JModel_t, JMinimiser_t > regressor_type
 
typedef minimiser_type::result_type result_type
 

Public Member Functions

template<class T >
result_type operator() (const JModel_t &value, T __begin, T __end)
 Global fit. More...
 
template<class JFunction_t , class T >
result_type operator() (const JFunction_t &fit, T __begin, T __end)
 Get chi2. More...
 

Public Attributes

JModel_t value
 model value More...
 

Static Public Attributes

static int debug = 0
 debug level (default is off). More...
 

Detailed Description

template<class JModel_t, template< class > class JMinimiser_t = JAbstractMinimiser>
struct JFIT::JAbstractRegressor< JModel_t, JMinimiser_t >

Abstract class for global fit method.

Definition at line 77 of file JRegressor.hh.

Member Typedef Documentation

◆ minimiser_type

template<class JModel_t , template< class > class JMinimiser_t = JAbstractMinimiser>
typedef JMinimiser_t<JModel_t> JFIT::JAbstractRegressor< JModel_t, JMinimiser_t >::minimiser_type

Definition at line 80 of file JRegressor.hh.

◆ regressor_type

template<class JModel_t , template< class > class JMinimiser_t = JAbstractMinimiser>
typedef JRegressor<JModel_t, JMinimiser_t> JFIT::JAbstractRegressor< JModel_t, JMinimiser_t >::regressor_type

Definition at line 81 of file JRegressor.hh.

◆ result_type

template<class JModel_t , template< class > class JMinimiser_t = JAbstractMinimiser>
typedef minimiser_type::result_type JFIT::JAbstractRegressor< JModel_t, JMinimiser_t >::result_type

Definition at line 82 of file JRegressor.hh.

Member Function Documentation

◆ operator()() [1/2]

template<class JModel_t , template< class > class JMinimiser_t = JAbstractMinimiser>
template<class T >
result_type JFIT::JAbstractRegressor< JModel_t, JMinimiser_t >::operator() ( const JModel_t &  value,
__begin,
__end 
)
inline

Global fit.

Parameters
valuestart value
__beginbegin of data set
__endend of data set
Returns
chi2

Definition at line 94 of file JRegressor.hh.

95  {
96  static_cast<minimiser_type&>(*this).value = value;
97 
98  return static_cast<minimiser_type&>(*this)(static_cast<regressor_type&>(*this), __begin, __end);
99  }
JModel_t value
model value
Definition: JRegressor.hh:59
JMinimiser_t< JModel_t > minimiser_type
Definition: JRegressor.hh:80
JRegressor< JModel_t, JMinimiser_t > regressor_type
Definition: JRegressor.hh:81

◆ operator()() [2/2]

template<class JModel_t >
template<class JFunction_t , class T >
result_type JFIT::JAbstractMinimiser< JModel_t >::operator() ( const JFunction_t &  fit,
__begin,
__end 
)
inlineinherited

Get chi2.

Parameters
fitfit function
__beginbegin of data
__endend of data
Returns
chi2

Definition at line 48 of file JRegressor.hh.

49  {
50  double chi2 = 0.0;
51 
52  for (T i = __begin; i != __end; ++i) {
53  chi2 += fit(value, *i);
54  }
55 
56  return chi2;
57  }

Member Data Documentation

◆ value

template<class JModel_t >
JModel_t JFIT::JAbstractMinimiser< JModel_t >::value
inherited

model value

Definition at line 59 of file JRegressor.hh.

◆ debug

template<class T >
int JEEP::JMessage< T >::debug = 0
staticinherited

debug level (default is off).

Definition at line 45 of file JMessage.hh.


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