Jpp  19.1.0-rc.1
the software that should make you happy
Public Member Functions | List of all members
JMATH::JLog< JF1_t > Struct Template Reference

Logarithm of function. More...

#include <JMathlib.hh>

Inheritance diagram for JMATH::JLog< JF1_t >:
JMATH::JMathlib< JLog< JF1_t > >

Public Member Functions

 JLog ()
 Default constructor. More...
 
 JLog (const JF1_t &f1)
 Constructor. More...
 
double getValue (const double x) const
 Function value. More...
 
double getDerivative (const double x) const
 Derivative value. More...
 
const JLog & getGradient (const double x) const
 Get gradient. More...
 
double operator() (const Args &...args) const
 Function value. More...
 

Detailed Description

template<class JF1_t>
struct JMATH::JLog< JF1_t >

Logarithm of function.

Definition at line 2555 of file JMathlib.hh.

Constructor & Destructor Documentation

◆ JLog() [1/2]

template<class JF1_t >
JMATH::JLog< JF1_t >::JLog ( )
inline

Default constructor.

Definition at line 2565 of file JMathlib.hh.

2565  :
2566  JF1_t()
2567  {}

◆ JLog() [2/2]

template<class JF1_t >
JMATH::JLog< JF1_t >::JLog ( const JF1_t &  f1)
inline

Constructor.

Parameters
f1function

Definition at line 2575 of file JMathlib.hh.

2575  :
2576  JF1_t(f1)
2577  {}
const JPolynome f1(1.0, 2.0, 3.0)
Function.

Member Function Documentation

◆ getValue()

template<class JF1_t >
double JMATH::JLog< JF1_t >::getValue ( const double  x) const
inline

Function value.

Parameters
xabscissa value
Returns
function value

Definition at line 2586 of file JMathlib.hh.

2587  {
2588  return log(static_cast<const JF1_t&>(*this).getValue(x));
2589  }

◆ getDerivative()

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

Derivative value.

Parameters
xabscissa value
Returns
derivative value

Definition at line 2598 of file JMathlib.hh.

2599  {
2600  return static_cast<const JF1_t&>(*this).getDerivative(x) / static_cast<const JF1_t&>(*this).getValue(x);
2601  }

◆ getGradient()

template<class JF1_t >
const JLog& JMATH::JLog< JF1_t >::getGradient ( const double  x) const
inline

Get gradient.

Parameters
xabscissa value
Returns
gradient

Definition at line 2610 of file JMathlib.hh.

2611  {
2612  static JLog gradient;
2613 
2614  gradient = static_cast<const JF1_t&>(*this).getGradient(x);
2615  gradient /= (static_cast<const JF1_t&>(*this).getValue(x));
2616 
2617  return gradient;
2618  }
Logarithm of function.
Definition: JMathlib.hh:2558
const JLog & getGradient(const double x) const
Get gradient.
Definition: JMathlib.hh:2610

◆ operator()()

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

Function value.

Parameters
argsabscissa value(s)
Returns
function value

Definition at line 362 of file JMathlib.hh.

363  {
364  return static_cast<const JF1_t&>(*this).getValue(args...);
365  }

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