Negate of function.
More...
#include <JMathlib.hh>
|
| JNegate () |
| Default constructor.
|
|
| JNegate (const JF1_t &f1) |
| Constructor.
|
|
template<class ... Args> |
double | getValue (const Args &...args) const |
| Function value.
|
|
double | getDerivative (const double x) const |
| Derivative value.
|
|
template<class ... Args> |
const JNegate & | getGradient (const Args &...args) const |
| Get gradient.
|
|
double | operator() (const Args &...args) const |
| Function value.
|
|
template<class JF1_t>
struct JMATH::JNegate< JF1_t >
Negate of function.
Definition at line 557 of file JMathlib.hh.
◆ JNegate() [1/2]
◆ JNegate() [2/2]
Constructor.
- Parameters
-
Definition at line 576 of file JMathlib.hh.
576 :
577 JF1_t(f1)
578 {}
◆ getValue()
template<class JF1_t >
template<class ... Args>
double JMATH::JNegate< JF1_t >::getValue |
( |
const Args &... | args | ) |
const |
|
inline |
Function value.
- Parameters
-
- Returns
- function value
Definition at line 588 of file JMathlib.hh.
589 {
590 return -
static_cast<const JF1_t&
>(*this).getValue(
args...);
591 }
◆ getDerivative()
Derivative value.
- Parameters
-
- Returns
- derivative value
Definition at line 600 of file JMathlib.hh.
601 {
602 return -static_cast<const JF1_t&>(*this).getDerivative(x);
603 }
◆ getGradient()
template<class JF1_t >
template<class ... Args>
Get gradient.
- Parameters
-
- Returns
- gradient
Definition at line 613 of file JMathlib.hh.
614 {
616
617 static_cast<JF1_t&
>(gradient) =
static_cast<const JF1_t&
>(*this).getGradient(
args...);
618 static_cast<JF1_t&>(gradient).negate();
619
620 return gradient;
621 }
JNegate()
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: