Sine of function.  
 More...
#include <JMathlib.hh>
 | 
|   | JSin () | 
|   | Default constructor.  
  | 
|   | 
|   | JSin (const JF1_t &f1) | 
|   | Constructor.  
  | 
|   | 
| double  | getValue (const double x) const | 
|   | Function value.  
  | 
|   | 
| double  | getDerivative (const double x) const | 
|   | Derivative value.  
  | 
|   | 
| const JSin &  | getGradient (const double x) const | 
|   | Get gradient.  
  | 
|   | 
| double  | operator() (const Args &...args) const | 
|   | Function value.  
  | 
|   | 
template<class JF1_t>
struct JMATH::JSin< JF1_t >
Sine of function. 
Definition at line 2221 of file JMathlib.hh.
 
◆ JSin() [1/2]
Default constructor. 
Definition at line 2231 of file JMathlib.hh.
 2231           :
 2232      JF1_t()
 2233    {}
 
 
 
◆ JSin() [2/2]
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 2241 of file JMathlib.hh.
 2241                          :
 2242      JF1_t(f1)
 2243    {}
 
 
 
◆ getValue()
template<class JF1_t > 
  
  
      
        
          | double JMATH::JSin< JF1_t >::getValue  | 
          ( | 
          const double |           x | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Function value. 
- Parameters
 - 
  
  
 
- Returns
 - function value 
 
Definition at line 2252 of file JMathlib.hh.
 2253    {
 2254      const double u = 
static_cast<const JF1_t&
>(*this).getValue(x);
 
 2255 
 2256      return sin(u);
 2257    }
 
 
 
◆ getDerivative()
template<class JF1_t > 
  
  
      
        
          | double JMATH::JSin< JF1_t >::getDerivative  | 
          ( | 
          const double |           x | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Derivative value. 
- Parameters
 - 
  
  
 
- Returns
 - derivative value 
 
Definition at line 2266 of file JMathlib.hh.
 2267    {
 2268      const double u = 
static_cast<const JF1_t&
>(*this).getValue(x);
 
 2269      const double v = 
static_cast<const JF1_t&
>(*this).getDerivative(x);
 
 2270 
 2272    }
 
 
 
◆ getGradient()
Get gradient. 
- Parameters
 - 
  
  
 
- Returns
 - gradient 
 
Definition at line 2281 of file JMathlib.hh.
 2282    {
 2283      static JSin gradient;                                   
 
 2284 
 2285      const double u = 
static_cast<const JF1_t&
>(*this).getValue(x);
 
 2286 
 2287      static_cast<JF1_t&>(gradient)  = static_cast<const JF1_t&>(*this).getGradient(x);
 2288      static_cast<JF1_t&>(gradient) *= cos(u);
 2289 
 2290      return gradient;
 2291    }
JSin()
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: