Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JMATH::JMathlib< JF1_t > Struct Template Reference

forward declaration for pointer to function. More...

#include <JMathlib.hh>

Public Member Functions

template<class ... Args>
double operator() (const Args &...args) const
 Function value.
 
double operator[] (const size_t i) const
 Get value of parameter at given index.
 
double & operator[] (const size_t i)
 Get value of parameter at given index.
 

Friends

const JF1_t & operator+ (const JF1_t &function)
 Affirm operator.
 
JNegate< JF1_t > operator- (const JF1_t &function)
 Negate operator.
 
JAdd< JF1_t > operator+ (const JF1_t &f1, const double value)
 Addition of constant value.
 
JAdd< JF1_t > operator+ (const double value, const JF1_t &f1)
 Addition of constant value.
 
JSub< JF1_t > operator- (const JF1_t &f1, const double value)
 Subtraction of constant value.
 
JAdd< JNegate< JF1_t > > operator- (const double value, const JF1_t &f1)
 Subtraction of constant value.
 
JMul< JF1_t > operator* (const JF1_t &f1, const double value)
 Multiplication of constant value.
 
JMul< JF1_t > operator* (const double value, const JF1_t &f1)
 Multiplication of constant value.
 
JDiv< JF1_t > operator/ (const JF1_t &f1, const double value)
 Division of constant value.
 
template<class JF2_t >
JAdd< JF1_t, JF2_t > operator+ (const JF1_t &f1, const JF2_t &f2)
 Addition of two functions.
 
template<class JF2_t >
JSub< JF1_t, JF2_t > operator- (const JF1_t &f1, const JF2_t &f2)
 Subtraction of two functions.
 
template<class JF2_t >
JMul< JF1_t, JF2_t > operator* (const JF1_t &f1, const JF2_t &f2)
 Multiplication of two functions.
 
template<class JF2_t >
JDiv< JF1_t, JF2_t > operator/ (const JF1_t &f1, const JF2_t &f2)
 Division of two functions.
 
JFn< JF1_t > operator^ (const JF1_t &f1, int N)
 Power-of operator.
 
JPf< JF1_t > operator& (const JF1_t &f1)
 Address-of operator.
 

Detailed Description

template<class JF1_t>
struct JMATH::JMathlib< JF1_t >

forward declaration for pointer to function.

Auxiliary base class for mathematical operations on functions.

Definition at line 323 of file JMathlib.hh.

Member Function Documentation

◆ operator()()

template<class JF1_t >
template<class ... Args>
double JMATH::JMathlib< JF1_t >::operator() ( const Args &... args) const
inline

Function value.

Parameters
argsabscissa value(s)
Returns
function value

Definition at line 331 of file JMathlib.hh.

332 {
333 return static_cast<const JF1_t&>(*this).getValue(args...);
334 }

◆ operator[]() [1/2]

template<class JF1_t >
double JMATH::JMathlib< JF1_t >::operator[] ( const size_t i) const
inline

Get value of parameter at given index.

Parameters
iindex
Returns
value

Definition at line 539 of file JMathlib.hh.

540 {
541 return static_cast<const JF1_t&>(*this).*JF1_t::parameters[i];
542 }

◆ operator[]() [2/2]

template<class JF1_t >
double & JMATH::JMathlib< JF1_t >::operator[] ( const size_t i)
inline

Get value of parameter at given index.

Parameters
iindex
Returns
value

Definition at line 551 of file JMathlib.hh.

552 {
553 return static_cast<JF1_t&>(*this).*JF1_t::parameters[i];
554 }

Friends And Related Symbol Documentation

◆ operator+ [1/4]

template<class JF1_t >
const JF1_t & operator+ ( const JF1_t & function)
friend

Affirm operator.

Parameters
functionthis function
Returns
result function

Definition at line 343 of file JMathlib.hh.

344 {
345 return function;
346 }

◆ operator- [1/4]

template<class JF1_t >
JNegate< JF1_t > operator- ( const JF1_t & function)
friend

Negate operator.

Parameters
functionthis function
Returns
result function

Definition at line 355 of file JMathlib.hh.

356 {
357 return JNegate<JF1_t>(function);
358 }

◆ operator+ [2/4]

template<class JF1_t >
JAdd< JF1_t > operator+ ( const JF1_t & f1,
const double value )
friend

Addition of constant value.

Parameters
f1function
valuevalue
Returns
result function

Definition at line 368 of file JMathlib.hh.

369 {
370 return JAdd<JF1_t>(f1, value);
371 }

◆ operator+ [3/4]

template<class JF1_t >
JAdd< JF1_t > operator+ ( const double value,
const JF1_t & f1 )
friend

Addition of constant value.

Parameters
valuevalue
f1function
Returns
result function

Definition at line 381 of file JMathlib.hh.

382 {
383 return JAdd<JF1_t>(f1, value);
384 }

◆ operator- [2/4]

template<class JF1_t >
JSub< JF1_t > operator- ( const JF1_t & f1,
const double value )
friend

Subtraction of constant value.

Parameters
f1function
valuevalue
Returns
result function

Definition at line 394 of file JMathlib.hh.

395 {
396 return JSub<JF1_t>(f1, value);
397 }

◆ operator- [3/4]

template<class JF1_t >
JAdd< JNegate< JF1_t > > operator- ( const double value,
const JF1_t & f1 )
friend

Subtraction of constant value.

Parameters
f1function
valuevalue
Returns
result function

Definition at line 407 of file JMathlib.hh.

408 {
409 return JAdd< JNegate<JF1_t> >(JNegate<JF1_t>(f1), value);
410 }

◆ operator* [1/3]

template<class JF1_t >
JMul< JF1_t > operator* ( const JF1_t & f1,
const double value )
friend

Multiplication of constant value.

Parameters
f1function
valuevalue
Returns
result function

Definition at line 420 of file JMathlib.hh.

421 {
422 return JMul<JF1_t>(f1, value);
423 }

◆ operator* [2/3]

template<class JF1_t >
JMul< JF1_t > operator* ( const double value,
const JF1_t & f1 )
friend

Multiplication of constant value.

Parameters
valuevalue
f1function
Returns
result function

Definition at line 433 of file JMathlib.hh.

434 {
435 return JMul<JF1_t>(f1, value);
436 }

◆ operator/ [1/2]

template<class JF1_t >
JDiv< JF1_t > operator/ ( const JF1_t & f1,
const double value )
friend

Division of constant value.

Parameters
f1function
valuevalue
Returns
result function

Definition at line 446 of file JMathlib.hh.

447 {
448 return JDiv<JF1_t>(f1, value);
449 }

◆ operator+ [4/4]

template<class JF1_t >
template<class JF2_t >
JAdd< JF1_t, JF2_t > operator+ ( const JF1_t & f1,
const JF2_t & f2 )
friend

Addition of two functions.

Parameters
f1first function
f2second function
Returns
result function

Definition at line 460 of file JMathlib.hh.

461 {
462 return JAdd<JF1_t, JF2_t>(f1, f2);
463 }

◆ operator- [4/4]

template<class JF1_t >
template<class JF2_t >
JSub< JF1_t, JF2_t > operator- ( const JF1_t & f1,
const JF2_t & f2 )
friend

Subtraction of two functions.

Parameters
f1first function
f2second function
Returns
result function

Definition at line 474 of file JMathlib.hh.

475 {
476 return JSub<JF1_t, JF2_t>(f1, f2);
477 }

◆ operator* [3/3]

template<class JF1_t >
template<class JF2_t >
JMul< JF1_t, JF2_t > operator* ( const JF1_t & f1,
const JF2_t & f2 )
friend

Multiplication of two functions.

Parameters
f1first function
f2second function
Returns
result function

Definition at line 488 of file JMathlib.hh.

489 {
490 return JMul<JF1_t, JF2_t>(f1, f2);
491 }

◆ operator/ [2/2]

template<class JF1_t >
template<class JF2_t >
JDiv< JF1_t, JF2_t > operator/ ( const JF1_t & f1,
const JF2_t & f2 )
friend

Division of two functions.

Parameters
f1first function
f2second function
Returns
result function

Definition at line 502 of file JMathlib.hh.

503 {
504 return JDiv<JF1_t, JF2_t>(f1, f2);
505 }

◆ operator^

template<class JF1_t >
JFn< JF1_t > operator^ ( const JF1_t & f1,
int N )
friend

Power-of operator.

Parameters
f1function
Npower
Returns
result function

Definition at line 515 of file JMathlib.hh.

516 {
517 return JFn<JF1_t>(f1, N);
518 }

◆ operator&

template<class JF1_t >
JPf< JF1_t > operator& ( const JF1_t & f1)
friend

Address-of operator.

Parameters
f1function
Returns
result function

Definition at line 527 of file JMathlib.hh.

528 {
529 return JPf<JF1_t>(std::addressof(f1));
530 }

The documentation for this struct was generated from the following file: