Jpp 21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JMATH::JDiv< JF1_t, double > Struct Template Reference

Division of constant value. More...

#include <JMathlib.hh>

Inheritance diagram for JMATH::JDiv< JF1_t, double >:
JMATH::JMathlib< JDiv< JF1_t, double > >

Public Member Functions

 JDiv ()
 Default constructor.
 
 JDiv (const JF1_t &f1, const double value)
 Constructor.
 
template<class ... Args>
double getValue (const Args &...args) const
 Function value.
 
double getDerivative (const double x) const
 Derivative value.
 
template<class ... Args>
JDiv getGradient (const Args &...args) const
 Get gradient.
 
double operator() (const Args &...args) const
 Function value.
 
double operator[] (const size_t i) const
 Get value of parameter at given index.
 
double & operator[] (const size_t i)
 Get value of parameter at given index.
 

Static Public Member Functions

static size_t size ()
 Get size of parameter.
 

Private Attributes

double value
 

Detailed Description

template<class JF1_t>
struct JMATH::JDiv< JF1_t, double >

Division of constant value.

Definition at line 878 of file JMathlib.hh.

Constructor & Destructor Documentation

◆ JDiv() [1/2]

template<class JF1_t >
JMATH::JDiv< JF1_t, double >::JDiv ( )
inline

Default constructor.

Definition at line 889 of file JMathlib.hh.

890 {}

◆ JDiv() [2/2]

template<class JF1_t >
JMATH::JDiv< JF1_t, double >::JDiv ( const JF1_t & f1,
const double value )
inline

Constructor.

Parameters
f1function
valuevalue

Definition at line 899 of file JMathlib.hh.

899 :
900 JF1_t(f1),
901 value(value)
902 {}

Member Function Documentation

◆ getValue()

template<class JF1_t >
template<class ... Args>
double JMATH::JDiv< JF1_t, double >::getValue ( const Args &... args) const
inline

Function value.

Parameters
argsabscissa value(s)
Returns
function value

Definition at line 912 of file JMathlib.hh.

913 {
914 return static_cast<const JF1_t&>(*this).getValue(args...) / value;
915 }

◆ getDerivative()

template<class JF1_t >
double JMATH::JDiv< JF1_t, double >::getDerivative ( const double x) const
inline

Derivative value.

Parameters
xabscissa value
Returns
derivative value

Definition at line 924 of file JMathlib.hh.

925 {
926 return static_cast<const JF1_t&>(*this).getDerivative(x) / value;
927 }

◆ getGradient()

template<class JF1_t >
template<class ... Args>
JDiv JMATH::JDiv< JF1_t, double >::getGradient ( const Args &... args) const
inline

Get gradient.

Parameters
argsabscissa value(s)
Returns
gradient

Definition at line 937 of file JMathlib.hh.

938 {
939 JDiv gradient;
940
941 static_cast<JF1_t&>(gradient) = static_cast<const JF1_t&>(*this).getGradient(args...);
942 static_cast<JF1_t&>(gradient) /= value;
943
944 return gradient;
945 }
JDiv()
Default constructor.
Definition JMathlib.hh:889

◆ operator()()

double JMATH::JMathlib< JF1_t >::operator() ( const Args &... args) const
inlineinherited

Function value.

Parameters
argsabscissa value(s)
Returns
function value

Definition at line 331 of file JMathlib.hh.

332 {
333 return static_cast<const JF1_t&>(*this).getValue(args...);
334 }

◆ size()

static size_t JMATH::JMathlib< JF1_t >::size ( )
inlinestaticinherited

Get size of parameter.

Returns
size

Definition at line 538 of file JMathlib.hh.

539 {
540 return JF1_t::parameters.size();
541 }

◆ operator[]() [1/2]

double JMATH::JMathlib< JF1_t >::operator[] ( const size_t i) const
inlineinherited

Get value of parameter at given index.

Parameters
iindex
Returns
value

Definition at line 550 of file JMathlib.hh.

551 {
552 return static_cast<const JF1_t&>(*this).*JF1_t::parameters[i];
553 }

◆ operator[]() [2/2]

double & JMATH::JMathlib< JF1_t >::operator[] ( const size_t i)
inlineinherited

Get value of parameter at given index.

Parameters
iindex
Returns
value

Definition at line 562 of file JMathlib.hh.

563 {
564 return static_cast<JF1_t&>(*this).*JF1_t::parameters[i];
565 }

Member Data Documentation

◆ value

template<class JF1_t >
double JMATH::JDiv< JF1_t, double >::value
private

Definition at line 948 of file JMathlib.hh.


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