Logarithm of function.  
 More...
#include <JMathlib.hh>
 | 
|   | 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 JLog &  | getGradient (const double x) const | 
|   | Get gradient.  
  | 
|   | 
| double  | operator() (const Args &...args) const | 
|   | Function value.  
  | 
|   | 
template<class JF1_t>
struct JMATH::JLog< JF1_t >
Logarithm of function. 
Definition at line 2555 of file JMathlib.hh.
 
◆ JLog() [1/2]
Default constructor. 
Definition at line 2565 of file JMathlib.hh.
 2565           :
 2566      JF1_t()
 2567    {}
 
 
 
◆ JLog() [2/2]
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 2575 of file JMathlib.hh.
 2575                          :
 2576      JF1_t(f1)
 2577    {}
 
 
 
◆ getValue()
template<class JF1_t > 
  
  
      
        
          | double JMATH::JLog< JF1_t >::getValue  | 
          ( | 
          const double |           x | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Function value. 
- Parameters
 - 
  
  
 
- 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
 - 
  
  
 
- 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()
Get gradient. 
- Parameters
 - 
  
  
 
- 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.
 
 
 
 
◆ operator()()
Function value. 
- Parameters
 - 
  
  
 
- 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: