Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
MathUtils::Composite< Outer, Inner > Class Template Reference

Composite functor: f(g(x)). Evaluates the outer function at the result of the inner function. More...

#include <MathUtils_FunctorScalar.hxx>

Public Member Functions

 Composite (Outer theOuter, Inner theInner)
 Constructor from outer and inner functions.
 
bool Value (double theX, double &theY) const
 Evaluates composite function f(g(theX)).
 

Detailed Description

template<typename Outer, typename Inner>
class MathUtils::Composite< Outer, Inner >

Composite functor: f(g(x)). Evaluates the outer function at the result of the inner function.

Usage:

Polynomial aInner({0.0, 1.0}); // g(x) = x
Polynomial aOuter({-1.0, 0.0, 1.0}); // f(x) = x^2 - 1
Composite aComp(aOuter, aInner); // f(g(x)) = x^2 - 1
Composite(Outer theOuter, Inner theInner)
Constructor from outer and inner functions.
Definition MathUtils_FunctorScalar.hxx:347
Polynomial functor: f(x) = sum(a[i] * x^i). Coefficients are stored in order: a[0] + a[1]*x + a[2]*x^...
Definition MathUtils_FunctorScalar.hxx:148
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Template Parameters
Outerouter function type (must have Value method)
Innerinner function type (must have Value method)

Constructor & Destructor Documentation

◆ Composite()

template<typename Outer , typename Inner >
MathUtils::Composite< Outer, Inner >::Composite ( Outer theOuter,
Inner theInner )
inline

Constructor from outer and inner functions.

Parameters
theOuterouter function f
theInnerinner function g

Member Function Documentation

◆ Value()

template<typename Outer , typename Inner >
bool MathUtils::Composite< Outer, Inner >::Value ( double theX,
double & theY ) const
inline

Evaluates composite function f(g(theX)).

Parameters
[in]theXinput value
[out]theYfunction value f(g(theX))
Returns
false if either evaluation fails

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