Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JMathlib.hh File Reference

Functional algebra. More...

#include <cstddef>
#include <cmath>
#include <array>
#include <utility>
#include <memory>

Go to the source code of this file.

Classes

struct  JMATH::JCalculus< JF1_t >
 Auxiliary base class for mathematical operations on parameters of function. More...
 
struct  JMATH::JMathlib< JF1_t >
 forward declaration for pointer to function. More...
 
struct  JMATH::JNegate< JF1_t >
 Negate of function. More...
 
struct  JMATH::JAdd< JF1_t, double >
 Addition of constant value. More...
 
struct  JMATH::JSub< JF1_t, double >
 Subtraction of constant value. More...
 
struct  JMATH::JMul< JF1_t, double >
 Multiplication of constant value. More...
 
struct  JMATH::JDiv< JF1_t, double >
 Division of constant value. More...
 
struct  JMATH::JPair< JF1_t, JF2_t, v1, v2 >
 Auxiliary data structure for pair of functions. More...
 
struct  JMATH::JPair< JF1_t, JF2_t, true, false >
 Template specialisation for pair of functions. More...
 
struct  JMATH::JPair< JF1_t, JF2_t, false, true >
 Template specialisation for pair of functions. More...
 
struct  JMATH::JPair< JF1_t, JF2_t, false, false >
 Template specialisation for pair of functions. More...
 
struct  JMATH::JPair_t< JF1_t, JF2_t >
 Auxiliary data structure for pair of functions. More...
 
struct  JMATH::JAdd< JF1_t, JF2_t >
 forward declaration for negation of function. More...
 
struct  JMATH::JSub< JF1_t, JF2_t >
 forward declaration for addition of fuction. More...
 
struct  JMATH::JMul< JF1_t, JF2_t >
 forward declaration for subtraction of fuction. More...
 
struct  JMATH::JDiv< JF1_t, JF2_t >
 forward declaration for multiplication of fuction. More...
 
struct  JMATH::JFn< JF1_t >
 forward declaration for division of fuction. More...
 
struct  JMATH::JX
 x. More...
 
struct  JMATH::JXn< N >
 Function object for x;. More...
 
struct  JMATH::JPf< void >
 Function object for x^5;. More...
 
struct  JMATH::JPf< JF1_t >
 forward declaration for fixed power of function. More...
 
struct  JMATH::JPolynome< ID_t, N >
 Recursive template class for polynomial function. More...
 
struct  JMATH::JPolynome< ID_t, 0 >
 Termination class for polynomial function. More...
 
struct  JMATH::JGauss< ID_t, normalised >
 Gauss function object. More...
 
struct  JMATH::JGauss< ID_t, true >
 Gauss function. More...
 
struct  JMATH::JPow< ID_t, JF1_t >
 Power of function. More...
 
struct  JMATH::JSqrt< JF1_t >
 Square root of function. More...
 
struct  JMATH::JSin< JF1_t >
 Sine of function. More...
 
struct  JMATH::JCos< JF1_t >
 Cosine of function. More...
 
struct  JMATH::JExp< JF1_t >
 Exponent of function. More...
 
struct  JMATH::JExp< JPolynome< ID_t, 0 > >
 Exponent of zero degree polynomial function. More...
 
struct  JMATH::JLog< JF1_t >
 Logarithm of function. More...
 

Namespaces

namespace  JMATH
 
namespace  JPP
 This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 

Typedefs

template<class JF1_t , size_t N>
using JMATH::parameter_list = std::array<double JF1_t::*, N>
 Type definition for list of parameters.
 
template<int ID_t>
using JMATH::JP0 = JPolynome<ID_t, 0>
 shorthand for 0th degree polynome
 
template<int ID_t>
using JMATH::P0 = JP0<ID_t>
 shorthand for constant term
 
template<int ID_t>
using JMATH::JP1 = JPolynome<ID_t, 1>
 shorthand for 1st degree polynome
 
template<int ID_t>
using JMATH::JP2 = JPolynome<ID_t, 2>
 shorthand for 2nd degree polynome
 
template<int ID_t>
using JMATH::JP3 = JPolynome<ID_t, 3>
 shorthand for 3rd degree polynome
 

Functions

template<typename U , typename V , typename W , size_t ... i>
constexpr parameter_list< U, sizeof...(i)+1 > JMATH::join (const parameter_list< V, sizeof...(i)> &parameters, const std::index_sequence< i... > &ls, double W::*parameter)
 Auxiliary method to join parameter and list of parameters.
 
template<typename U , typename V , size_t N, typename W >
constexpr parameter_list< U, N+1 > JMATH::join (const parameter_list< V, N > &parameters, double W::*parameter)
 Join parameter and list of parameters.
 
template<typename U , typename V , typename W , size_t ... iv, size_t ... iw>
constexpr parameter_list< U, sizeof...(iv)+sizeof...(iw)> JMATH::join (const parameter_list< V, sizeof...(iv)> &v, const std::index_sequence< iv... > &lv, const parameter_list< W, sizeof...(iw)> &w, const std::index_sequence< iw... > &lw)
 Auxiliary method to join two parameter lists.
 
template<typename U , typename V , size_t NV, typename W , size_t NW>
constexpr parameter_list< U, NV+NW > JMATH::join (const parameter_list< V, NV > &v, const parameter_list< W, NW > &w)
 Join two parameter lists.
 
template<typename U , typename V , size_t ... i>
constexpr parameter_list< U, sizeof...(i)> JMATH::convert (const parameter_list< V, sizeof...(i)> &parameters, const std::index_sequence< i... > &ls)
 Auxiliary method to convert parameter list.
 
template<typename U , typename V , size_t N>
constexpr parameter_list< U, N > JMATH::convert (const parameter_list< V, N > &parameters)
 Convert parameter list.
 
template<class JF1_t >
constexpr size_t JMATH::getNumberOfParameters ()
 Get number of parameters.
 
template<class JF1_t >
void JMATH::setParameters (JF1_t *f1, const double *values)
 Set values of all parameters.
 
template<class JF1_t >
JPow< JF1_t::ID, JF1_t > JMATH::Pow (const JF1_t &f1, const double alpha)
 Power of function.
 
template<class JF1_t >
JSqrt< JF1_t > JMATH::Sqrt (const JF1_t &f1)
 Square root of function.
 
template<class JF1_t >
JSin< JF1_t > JMATH::Sin (const JF1_t &f1)
 Sine of function.
 
template<class JF1_t >
JCos< JF1_t > JMATH::Cos (const JF1_t &f1)
 Cosine of function.
 
template<class JF1_t >
JExp< JF1_t > JMATH::Exp (const JF1_t &f1)
 Exponent of function.
 
template<class JF1_t >
JLog< JF1_t > JMATH::Log (const JF1_t &f1)
 Logarithm of function.
 

Variables

static const JX JMATH::X
 
static const JXn< 2 > JMATH::X2
 Invalidate x^0.
 
static const JXn< 3 > JMATH::X3
 Function object for x^2;.
 
static const JXn< 4 > JMATH::X4
 Function object for x^3;.
 
static const JXn< 5 > JMATH::X5
 Function object for x^4;.
 

Detailed Description

Functional algebra.

Author
mdejong

Definition in file JMathlib.hh.