1 #ifndef __JMATH__JMATHLIB__ 
    2 #define __JMATH__JMATHLIB__ 
    6 #include <initializer_list> 
   20 namespace JPP { 
using namespace JMATH; }
 
   38     template<
class ...Args>
 
   50     operator const double*() 
const 
   62     template<
class ...Args>
 
  106       std::vector<double JF1_t::*>(1, parameter)
 
  116       std::vector<double JF1_t::*>(parameters)
 
  128       std::vector<double JF1_t::*>(parameters.begin(), parameters.end())
 
  130       this->push_back(parameter);
 
  140     template<
class U, 
class V>
 
  143       for (
const auto& i : first)  { this->push_back(i); }
 
  144       for (
const auto& i : second) { this->push_back(i); }
 
  154   template<
class JF1_t>
 
  157     return JF1_t::parameters.size();
 
  168   template<
class JF1_t>
 
  171     return f1.*JF1_t::parameters.at(i);
 
  181   template<
class JF1_t>
 
  184     if (
f1 != NULL && values != NULL) {
 
  185       for (
size_t i = 0; i != JF1_t::parameters.size(); ++i) {
 
  186         f1->*JF1_t::parameters[i] = values[i];
 
  195   template<
class JF1_t>
 
  205       for (
const auto& i : JF1_t::parameters) {
 
  206         static_cast<JF1_t&
>(*this).*i = -(
static_cast<JF1_t&
>(*this).*i);
 
  209       return static_cast<JF1_t&
>(*this);
 
  221       for (
const auto& i : JF1_t::parameters) {
 
  222         static_cast<JF1_t&
>(*this).*i += 
f1.*i;
 
  225       return static_cast<JF1_t&
>(*this);
 
  237       for (
const auto& i : JF1_t::parameters) {
 
  238         static_cast<JF1_t&
>(*this).*i -= 
f1.*i;
 
  241       return static_cast<JF1_t&
>(*this);
 
  251     JF1_t& 
mul(
const double factor)
 
  253       for (
const auto& i : JF1_t::parameters) {
 
  254         static_cast<JF1_t&
>(*this).*i *= factor;
 
  257       return static_cast<JF1_t&
>(*this);
 
  267     JF1_t& 
div(
const double factor)
 
  269       for (
const auto& i : JF1_t::parameters) {
 
  270         static_cast<JF1_t&
>(*this).*i /= factor;
 
  273       return static_cast<JF1_t&
>(*this);
 
  284     friend JF1_t& 
operator+=(JF1_t& 
function, 
const JF1_t& value)
 
  286       return function.add(value);
 
  297     friend JF1_t& 
operator-=(JF1_t& 
function, 
const JF1_t& value)
 
  299       return function.sub(value);
 
  310     friend JF1_t& 
operator*=(JF1_t& 
function, 
const double factor)
 
  312       return function.mul(factor);
 
  323     friend JF1_t& 
operator/=(JF1_t& 
function, 
const double factor)
 
  325       return function.div(factor);
 
  330   template<
class JF1_t>
 
  333   template<
class JF1_t, 
class JF2_t = 
double>
 
  336   template<
class JF1_t, 
class JF2_t = 
double>
 
  339   template<
class JF1_t, 
class JF2_t = 
double>
 
  342   template<
class JF1_t, 
class JF2_t = 
double>
 
  345   template<
class JF1_t>
 
  353   template<
class JF1_t>
 
  361     template<
class ...Args>
 
  364       return static_cast<const JF1_t&
>(*this).getValue(
args...);
 
  490     template<
class JF2_t>
 
  504     template<
class JF2_t>
 
  518     template<
class JF2_t>
 
  532     template<
class JF2_t>
 
  556   template<
class JF1_t>
 
  587     template<
class ...Args>
 
  590       return -
static_cast<const JF1_t&
>(*this).getValue(
args...);
 
  602       return -
static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
  612     template<
class ...Args>
 
  617       static_cast<JF1_t&
>(gradient) = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
  618       static_cast<JF1_t&
>(gradient).negate();
 
  628   template<
class JF1_t>
 
  630     public JMathlib< JAdd<JF1_t, double> >,
 
  649     JAdd(
const JF1_t& 
f1, 
const double value) :
 
  661     template<
class ...Args>
 
  664       return static_cast<const JF1_t&
>(*this).getValue(
args...) + value;
 
  676       return static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
  686     template<
class ...Args>
 
  689       static JAdd gradient;
 
  691       static_cast<JF1_t&
>(gradient) = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
  704   template<
class JF1_t>
 
  706     public JMathlib< JSub<JF1_t, double> >,
 
  725     JSub(
const JF1_t& 
f1, 
const double value) :
 
  737     template<
class ...Args>
 
  740       return static_cast<const JF1_t&
>(*this).getValue(
args...) - value;
 
  752       return static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
  762     template<
class ...Args>
 
  765       static JSub gradient;
 
  767       static_cast<JF1_t&
>(gradient) = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
  780   template<
class JF1_t>
 
  782     public JMathlib< JMul<JF1_t, double> >,
 
  801     JMul(
const JF1_t& 
f1, 
const double value) :
 
  813     template<
class ...Args>
 
  816       return static_cast<const JF1_t&
>(*this).getValue(
args...) * value;
 
  828       return static_cast<const JF1_t&
>(*this).getDerivative(
x) * value;
 
  838     template<
class ...Args>
 
  841       static JMul gradient;
 
  843       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
  844       static_cast<JF1_t&
>(gradient) *= value;
 
  857   template<
class JF1_t>
 
  859     public JMathlib< JDiv<JF1_t, double> >,
 
  878     JDiv(
const JF1_t& 
f1, 
const double value) :
 
  890     template<
class ...Args>
 
  893       return static_cast<const JF1_t&
>(*this).getValue(
args...) / value;
 
  905       return static_cast<const JF1_t&
>(*this).getDerivative(
x) / value;
 
  915     template<
class ...Args>
 
  918       static JDiv gradient;
 
  920       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
  921       static_cast<JF1_t&
>(gradient) /= value;
 
  934   template<
class JF1_t, 
class JF2_t>
 
  971   template<
class JF1_t, 
class JF2_t>
 
  978   template<
class JF1_t, 
class JF2_t>
 
  980     public JMathlib< JAdd<JF1_t, JF2_t> >,
 
  981     public JPair<JF1_t, JF2_t>
 
 1010     template<
class ...Args>
 
 1013       return (
static_cast<const JF1_t&
>(*this).getValue(
args...)  + 
 
 1014               static_cast<const JF2_t&
>(*this).getValue(
args...));
 
 1026       return (
static_cast<const JF1_t&
>(*this).getDerivative(
x)  + 
 
 1027               static_cast<const JF2_t&
>(*this).getDerivative(
x));
 
 1037     template<
class ...Args>
 
 1040       static JAdd gradient;
 
 1042       static_cast<JF1_t&
>(gradient) = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
 1043       static_cast<JF2_t&
>(gradient) = 
static_cast<const JF2_t&
>(*this).
getGradient(
args...);
 
 1053   template<
class JF1_t, 
class JF2_t>
 
 1055     public JMathlib< JSub<JF1_t, JF2_t> >,
 
 1056     public JPair<JF1_t, JF2_t>
 
 1085     template<
class ...Args>
 
 1088       return (
static_cast<const JF1_t&
>(*this).getValue(
args...)  - 
 
 1089               static_cast<const JF2_t&
>(*this).getValue(
args...));
 
 1101       return (
static_cast<const JF1_t&
>(*this).getDerivative(
x)  - 
 
 1102               static_cast<const JF2_t&
>(*this).getDerivative(
x));
 
 1112     template<
class ...Args>
 
 1115       static JSub gradient;
 
 1117       static_cast<JF1_t&
>(gradient) = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
 1118       static_cast<JF2_t&
>(gradient) = 
static_cast<const JF2_t&
>(*this).
getGradient(
args...);
 
 1119       static_cast<JF2_t&
>(gradient).
negate();
 
 1129   template<
class JF1_t, 
class JF2_t>
 
 1131     public JMathlib< JMul<JF1_t, JF2_t> >,
 
 1132     public JPair<JF1_t, JF2_t>
 
 1161     template<
class ...Args>
 
 1164       return (
static_cast<const JF1_t&
>(*this).getValue(
args...)  *
 
 1165               static_cast<const JF2_t&
>(*this).getValue(
args...));
 
 1177       return (
static_cast<const JF1_t&
>(*this).getDerivative(
x) * 
static_cast<const JF2_t&
>(*this).getValue(
x)  +
 
 1178               static_cast<const JF1_t&
>(*this).getValue(
x) * 
static_cast<const JF2_t&
>(*this).getDerivative(
x));
 
 1188     template<
class ...Args>
 
 1191       static JMul gradient;
 
 1193       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).
getGradient(
args...);
 
 1194       static_cast<JF1_t&
>(gradient) *= 
static_cast<const JF2_t&
>(*this).
getValue(
args...);
 
 1195       static_cast<JF2_t&
>(gradient)  = 
static_cast<const JF2_t&
>(*this).getGradient(
args...);
 
 1196       static_cast<JF2_t&
>(gradient) *= 
static_cast<const JF1_t&
>(*this).getValue(
args...);
 
 1206   template<
class JF1_t, 
class JF2_t>
 
 1208     public JMathlib< JDiv<JF1_t, JF2_t> >,
 
 1209     public JPair<JF1_t, JF2_t>
 
 1238     template<
class ...Args>
 
 1241       return (
static_cast<const JF1_t&
>(*this).getValue(
args...)  /
 
 1242               static_cast<const JF2_t&
>(*this).getValue(
args...));
 
 1254       const double v = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 1255       const double w = 
static_cast<const JF2_t&
>(*this).getValue(
x);
 
 1257       return (
static_cast<const JF1_t&
>(*this).getDerivative(
x) * 
w  - 
 
 1258               v * 
static_cast<const JF2_t&
>(*this).getDerivative(
x)) / (
w*
w);
 
 1268     template<
class ...Args>
 
 1271       static JDiv gradient;
 
 1273       const double v = 
static_cast<const JF1_t&
>(*this).getValue(
args...);
 
 1274       const double w = 
static_cast<const JF2_t&
>(*this).getValue(
args...);
 
 1276       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).getGradient(
args...);
 
 1277       static_cast<JF1_t&
>(gradient) *= 1.0/
w;
 
 1278       static_cast<JF2_t&
>(gradient)  = 
static_cast<const JF2_t&
>(*this).getGradient(
args...);
 
 1279       static_cast<JF2_t&
>(gradient) *= -
v/(
w*
w);
 
 1289   template<
class JF1_t>
 
 1325     template<
class ...Args>
 
 1328       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
args...);
 
 1342       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 1343       const double v = 
static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
 1355     template<
class ...Args>
 
 1358       static JFn gradient;
 
 1360       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
args...);
 
 1361       const double w = 
N * 
pow(
u, 
N - 1);
 
 1363       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).getGradient(
args...);
 
 1364       static_cast<JF1_t&
>(gradient) *= 
w;
 
 1376   template<
int ID_t, 
size_t N>
 
 1378     public JMathlib < JPolynome<ID_t, N> >,
 
 1382     static const int ID = ID_t;
 
 1407     template<
class ...Args>
 
 1449       gradient.
a = 
pow(
x,N);
 
 1476   template<
int ID_t, 
size_t N>
 
 1485     public JMathlib < JPolynome<ID_t, 0> >,
 
 1488     static const int ID = ID_t;
 
 1585   template<
int ID_t, 
bool normalised = false>
 
 1590     static const int ID = ID_t;
 
 1609            const double sigma) :
 
 1637       const double w  = 1.0 / 
sigma;
 
 1654       const double w  = 1.0 / 
sigma;
 
 1656       const double f0 =  
get(
u);
 
 1675     inline double get(
const double u)
 const 
 1677       return exp(-0.5*
u*
u);
 
 1684   template<
int ID_t, 
bool normalised>
 
 1693     public JMathlib < JGauss<ID_t, true> >,
 
 1696     static const int ID = ID_t;
 
 1715            const double sigma) :
 
 1743       const double w  = 1.0 / 
sigma;
 
 1760       const double w  = 1.0 / 
sigma;
 
 1762       const double f0 =  
get(
u);
 
 1781     inline double get(
const double u)
 const 
 1783       return exp(-0.5*
u*
u) / (sqrt(2.0*
PI) * 
sigma);
 
 1797   template<
int ID_t, 
class JF1_t = _vF>
 
 1799     public JMathlib < JPow<ID_t, JF1_t> >,
 
 1802     static const int ID = ID_t;
 
 1836       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 1850       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 1851       const double v = 
static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
 1865       static JPow gradient;                                   
 
 1867       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 1872       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).getGradient(
x);
 
 1873       static_cast<JF1_t&
>(gradient) *= 
alpha * 
w / 
u;
 
 1885   template<
int ID_t, 
class JF1_t>
 
 1896   template<
class JF1_t>
 
 1911     static const int ID = ID_t;
 
 1964       static JPow gradient;                                   
 
 2017       return N * 
pow(
x, N - 1);
 
 2029       static JXn gradient;
 
 2054   template<
class JF1_t = _vF>
 
 2088       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2102       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2103       const double v = 
static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
 2105       return 0.5 * 
v / sqrt(
u);
 
 2117       static JSqrt gradient;                                  
 
 2119       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2121       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).getGradient(
x);
 
 2122       static_cast<JF1_t&
>(gradient) *= 0.5 / sqrt(
u);
 
 2135   template<
class JF1_t>
 
 2180       return 0.5 / sqrt(
x);
 
 2192       static JSqrt gradient;
 
 2220   template<
class JF1_t>
 
 2254       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2268       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2269       const double v = 
static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
 2283       static JSin gradient;                                   
 
 2285       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2287       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).getGradient(
x);
 
 2288       static_cast<JF1_t&
>(gradient) *= cos(
u);
 
 2301   template<
class JF1_t>
 
 2311   template<
class JF1_t>
 
 2345       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2359       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2360       const double v = 
static_cast<const JF1_t&
>(*this).getDerivative(
x);
 
 2374       static JCos gradient;                                   
 
 2376       const double u = 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2378       static_cast<JF1_t&
>(gradient)  = 
static_cast<const JF1_t&
>(*this).getGradient(
x);
 
 2379       static_cast<JF1_t&
>(gradient) *= -sin(
u);
 
 2392   template<
class JF1_t>
 
 2402   template<
class JF1_t>
 
 2436       return exp(
static_cast<const JF1_t&
>(*this).getValue(
x));
 
 2448       return static_cast<const JF1_t&
>(*this).getDerivative(
x) * 
getValue(
x);
 
 2460       static JExp gradient;
 
 2462       gradient  = 
static_cast<const JF1_t&
>(*this).
getGradient(
x);
 
 2475     public JMathlib< JExp< JPolynome<ID_t, 0> > >,
 
 2528       static JExp gradient;
 
 2544   template<
class JF1_t>
 
 2554   template<
class JF1_t>
 
 2588       return log(
static_cast<const JF1_t&
>(*this).getValue(
x));
 
 2600       return static_cast<const JF1_t&
>(*this).getDerivative(
x) / 
static_cast<const JF1_t&
>(*this).getValue(
x);
 
 2612       static JLog gradient;
 
 2614       gradient  =  
static_cast<const JF1_t&
>(*this).
getGradient(
x);
 
 2615       gradient /= (
static_cast<const JF1_t&
>(*this).getValue(
x));
 
 2628   template<
class JF1_t>
 
const JPolynome f1(1.0, 2.0, 3.0)
Function.
 
Auxiliary classes and methods for mathematical operations.
 
JCos< JF1_t > Cos(const JF1_t &f1)
Cosine function.
 
size_t getNumberOfParameters()
Get number of parameters.
 
void setParameters(JF1_t *f1, const double *values)
Set values of all parameters.
 
double getParameter(const JF1_t &f1, const size_t i)
Get value of parameter at given index.
 
JExp< JF1_t > Exp(const JF1_t &f1)
Exponent of function.
 
JSin< JF1_t > Sin(const JF1_t &f1)
Sine of function.
 
JPow< JF1_t::ID, JF1_t > Pow(const JF1_t &f1, const double alpha)
Power of function.
 
T pow(const T &x, const double y)
Power .
 
static const double PI
Mathematical constants.
 
JLog< JF1_t > Log(const JF1_t &f1)
Logarithm of function.
 
JSqrt Sqrt()
Square root of x.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
const JAdd & getGradient(const Args &...args) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
JAdd()
Default constructor.
 
JAdd(const JF1_t &f1, const double value)
Constructor.
 
double getValue(const Args &...args) const
Function value.
 
forward declaration for negate of function.
 
double getDerivative(const double x) const
Derivative value.
 
const JAdd & getGradient(const Args &...args) const
Get gradient.
 
JAdd()
Default constructor.
 
double getValue(const Args &...args) const
Function value.
 
JAdd(const JF1_t &f1, const JF2_t &f2)
Constructor.
 
Auxiliary base class for mathematical operations on parameters of function.
 
JF1_t & negate()
Negate function.
 
JF1_t & div(const double factor)
Scale function.
 
friend JF1_t & operator/=(JF1_t &function, const double factor)
Scale function.
 
friend JF1_t & operator-=(JF1_t &function, const JF1_t &value)
Subtract function.
 
JF1_t & sub(const JF1_t &f1)
Subtract function.
 
friend JF1_t & operator+=(JF1_t &function, const JF1_t &value)
Add function.
 
JF1_t & add(const JF1_t &f1)
Add function.
 
friend JF1_t & operator*=(JF1_t &function, const double factor)
Scale function.
 
JF1_t & mul(const double factor)
Scale function.
 
JCos(const JF1_t &f1)
Constructor.
 
double getDerivative(const double x) const
Derivative value.
 
const JCos & getGradient(const double x) const
Get gradient.
 
double getValue(const double x) const
Function value.
 
JCos()
Default constructor.
 
JDiv(const JF1_t &f1, const double value)
Constructor.
 
double getValue(const Args &...args) const
Function value.
 
const JDiv & getGradient(const Args &...args) const
Get gradient.
 
JDiv()
Default constructor.
 
double getDerivative(const double x) const
Derivative value.
 
forward declaration for multiplication of fuction.
 
double getValue(const Args &...args) const
Function value.
 
const JDiv & getGradient(const Args &...args) const
Get gradient.
 
JDiv()
Default constructor.
 
JDiv(const JF1_t &f1, const JF2_t &f2)
Constructor.
 
double getDerivative(const double x) const
Derivative value.
 
double getDerivative(...) const
Derivative value.
 
double getValue(...) const
Function value.
 
const JExp & getGradient(...) const
Get gradient.
 
JExp()
Default constructor.
 
JExp(const JPolynome< ID_t, 0 > &f1)
Constructor.
 
JExp()
Default constructor.
 
const JExp & getGradient(const double x) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
double getValue(const double x) const
Function value.
 
JExp(const JF1_t &f1)
Constructor.
 
forward declaration for division of fuction.
 
JFn()
Default constructor.
 
const JFn & getGradient(const Args &...args) const
Get gradient.
 
JFn(const JF1_t &f1, const int N)
Constructor.
 
double getDerivative(const double x) const
Derivative value.
 
double getValue(const Args &...args) const
Function value.
 
JGauss(const double center, const double sigma)
Constructor.
 
const JGauss & getGradient(const double x) const
Get gradient.
 
JGauss()
Default constructor.
 
double getValue(const double x) const
Function value.
 
double getDerivative(const double x) const
Derivative value.
 
static const parameter_list< JGauss > parameters
parameters
 
double get(const double u) const
Get ordinate value.
 
const JGauss & getGradient(const double x) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
JGauss()
Default constructor.
 
double getValue(const double x) const
Function value.
 
static const parameter_list< JGauss > parameters
parameters
 
double get(const double u) const
Get ordinate value.
 
JGauss(const double center, const double sigma)
Constructor.
 
double getValue(const double x) const
Function value.
 
JLog()
Default constructor.
 
JLog(const JF1_t &f1)
Constructor.
 
double getDerivative(const double x) const
Derivative value.
 
const JLog & getGradient(const double x) const
Get gradient.
 
forward declaration for fixed power of function.
 
friend JAdd< JF1_t > operator+(const double value, const JF1_t &f1)
Addition of constant value.
 
friend JMul< JF1_t > operator*(const double value, const JF1_t &f1)
Multiplication of constant value.
 
friend JDiv< JF1_t > operator/(const JF1_t &f1, const double value)
Division of constant value.
 
friend JSub< JF1_t > operator-(const JF1_t &f1, const double value)
Subtraction of constant value.
 
friend JMul< JF1_t > operator*(const JF1_t &f1, const double value)
Multiplication of constant value.
 
friend JNegate< JF1_t > operator-(const JF1_t &function)
Negate operator.
 
friend JMul< JF1_t, JF2_t > operator*(const JF1_t &f1, const JF2_t &f2)
Multiplication of two functions.
 
friend JFn< JF1_t > operator^(const JF1_t &function, int N)
Power of operator.
 
friend JSub< JF1_t, JF2_t > operator-(const JF1_t &f1, const JF2_t &f2)
Subtraction of two functions.
 
friend JDiv< JF1_t, JF2_t > operator/(const JF1_t &f1, const JF2_t &f2)
Division of two functions.
 
friend JAdd< JF1_t, JF2_t > operator+(const JF1_t &f1, const JF2_t &f2)
Addition of two functions.
 
double operator()(const Args &...args) const
Function value.
 
friend JAdd< JF1_t > operator+(const JF1_t &f1, const double value)
Addition of constant value.
 
friend JAdd< JNegate< JF1_t > > operator-(const double value, const JF1_t &f1)
Subtraction of constant value.
 
friend const JF1_t & operator+(const JF1_t &function)
Affirm operator.
 
double getValue(const Args &...args) const
Function value.
 
JMul(const JF1_t &f1, const double value)
Constructor.
 
double getDerivative(const double x) const
Derivative value.
 
const JMul & getGradient(const Args &...args) const
Get gradient.
 
JMul()
Default constructor.
 
forward declaration for subtraction of fuction.
 
double getValue(const Args &...args) const
Function value.
 
JMul()
Default constructor.
 
JMul(const JF1_t &f1, const JF2_t &f2)
Constructor.
 
const JMul & getGradient(const Args &...args) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
double getValue(const Args &...args) const
Function value.
 
JNegate()
Default constructor.
 
JNegate(const JF1_t &f1)
Constructor.
 
const JNegate & getGradient(const Args &...args) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
Auxiliary data structure for pair of functions.
 
JPair()
Default constructor.
 
JPair(const JF1_t &f1, const JF2_t &f2)
Constructor.
 
static const parameter_list< JPair > parameters
parameters
 
Termination class for polynomial function.
 
static const parameter_list< JPolynome > parameters
parameters
 
void set(const double *array)
Set parameter values.
 
double getValue(...) const
Function value.
 
const JPolynome & getGradient(...) const
Get gradient.
 
double getDerivative(...) const
Derivative value.
 
JPolynome()
Default constructor.
 
JPolynome(const double a)
Constructor.
 
JPolynome_t & add(const JPolynome_t &polynome)
Add polynome.
 
JPolynome_t & sub(const JPolynome_t &polynome)
Subtract polynome.
 
JPolynome_t & mul(const double factor)
Scale polynome.
 
Recursive template class for polynomial function.
 
static const size_t NUMBER_OF_DEGREES
 
void set(const double *pA)
Set parameter values.
 
JPolynome()
Default constructor.
 
JPolynome(const Args &...args)
Constructor.
 
double getValue(const double x) const
Function value.
 
static const parameter_list< JPolynome > parameters
parameters
 
const JPolynome & getGradient(const double x) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
double getValue(const double x) const
Function value.
 
const JPow & getGradient(const double x) const
Get gradient.
 
JPow()
Default constructor.
 
double getDerivative(const double x) const
Derivative value.
 
static const parameter_list< JPow > parameters
parameters
 
JPow(const double alpha)
Constructor.
 
double getValue(const double x) const
Function value.
 
JPow(const JF1_t &f1, const double alpha)
Constructor.
 
const JPow & getGradient(const double x) const
Get gradient.
 
static const parameter_list< JPow > parameters
parameters
 
JPow()
Default constructor.
 
double getDerivative(const double x) const
Derivative value.
 
JSin()
Default constructor.
 
double getDerivative(const double x) const
Derivative value.
 
double getValue(const double x) const
Function value.
 
JSin(const JF1_t &f1)
Constructor.
 
const JSin & getGradient(const double x) const
Get gradient.
 
const JSqrt & getGradient(const double x) const
Get gradient.
 
JSqrt()
Default constructor.
 
double getValue(const double x) const
Function value.
 
double getDerivative(const double x) const
Derivative value.
 
static const parameter_list< JSqrt > parameters
parameters
 
JSqrt()
Default constructor.
 
const JSqrt & getGradient(const double x) const
Get gradient.
 
double getValue(const double x) const
Function value.
 
double getDerivative(const double x) const
Derivative value.
 
JSqrt(const JF1_t &f1)
Constructor.
 
const JSub & getGradient(const Args &...args) const
Get gradient.
 
double getValue(const Args &...args) const
Function value.
 
JSub()
Default constructor.
 
double getDerivative(const double x) const
Derivative value.
 
JSub(const JF1_t &f1, const double value)
Constructor.
 
forward declaration for addition of fuction.
 
double getDerivative(const double x) const
Derivative value.
 
double getValue(const Args &...args) const
Function value.
 
const JSub & getGradient(const Args &...args) const
Get gradient.
 
JSub()
Default constructor.
 
JSub(const JF1_t &f1, const JF2_t &f2)
Constructor.
 
double getValue(const double x) const
Function value.
 
const JXn & getGradient(const double x) const
Get gradient.
 
double getDerivative(const double x) const
Derivative value.
 
static const parameter_list< JXn > parameters
parameters
 
JXn()
Default constructor.
 
void add(const double x)
Termination method for adding values to array.
 
void add(const double x, const Args &...args)
Recursive method for adding values to array.
 
make_carray(const Args &...args)
Constructor.
 
Auxiliary data structure for list of parameters.
 
parameter_list(double JF1_t::*parameter)
Constructor.
 
parameter_list(const parameter_list< U > ¶meters, double JF1_t::*parameter)
Combine constructor.
 
parameter_list(const std::initializer_list< double JF1_t::* > ¶meters)
Constructor.
 
parameter_list()
Default constructor.
 
parameter_list(const parameter_list< U > &first, const parameter_list< V > &second)
Combine constructor.