Cosine of function.
More...
#include <JMathlib.hh>
template<class JF1_t>
struct JMATH::JCos< JF1_t >
Cosine of function.
Definition at line 2312 of file JMathlib.hh.
◆ JCos() [1/2]
◆ JCos() [2/2]
Constructor.
- Parameters
-
Definition at line 2332 of file JMathlib.hh.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
◆ getValue()
template<class JF1_t >
double JMATH::JCos< JF1_t >::getValue |
( |
const double |
x | ) |
const |
|
inline |
Function value.
- Parameters
-
- Returns
- function value
Definition at line 2343 of file JMathlib.hh.
2345 const double u =
static_cast<const JF1_t&
>(*this).getValue(
x);
◆ getDerivative()
template<class JF1_t >
double JMATH::JCos< JF1_t >::getDerivative |
( |
const double |
x | ) |
const |
|
inline |
Derivative value.
- Parameters
-
- Returns
- derivative value
Definition at line 2357 of file JMathlib.hh.
2359 const double u =
static_cast<const JF1_t&
>(*this).getValue(
x);
2360 const double v =
static_cast<const JF1_t&
>(*this).getDerivative(
x);
◆ getGradient()
Get gradient.
- Parameters
-
- Returns
- gradient
Definition at line 2372 of file JMathlib.hh.
2374 static JCos gradient;
2376 const double u =
static_cast<const JF1_t&
>(*this).getValue(
x);
2378 static_cast<JF1_t&
>(gradient) =
static_cast<const JF1_t&
>(*this).getGradient(
x);
2379 static_cast<JF1_t&
>(gradient) *= -sin(
u);
◆ operator()()
Function value.
- Parameters
-
- Returns
- function value
Definition at line 362 of file JMathlib.hh.
364 return static_cast<const JF1_t&
>(*this).getValue(
args...);
The documentation for this struct was generated from the following file: