Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
 JLog (const JF1_t &f1)
 Constructor.
 
double getValue (const double x) const
 Function value.
 
double getDerivative (const double x) const
 Derivative value.
 
const JLoggetGradient (const double x) const
 Get gradient.
 
double operator() (const Args &...args) const
 Function value.
 

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 {}

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 }
JLog()
Default constructor.
Definition JMathlib.hh:2565

◆ operator()()

double JMATH::JMathlib< 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: