Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Euclid::MathUtils::Differentiable Interface Referenceabstract

Interface representing a differentiable function. More...

#include <Differentiable.h>

Inheritance diagram for Euclid::MathUtils::Differentiable:
Inheritance graph
[legend]
Collaboration diagram for Euclid::MathUtils::Differentiable:
Collaboration graph
[legend]

Public Member Functions

virtual ~Differentiable ()=default
 Default destructor.
 
virtual std::shared_ptr< Functionderivative () const =0
 Returns a Function representing the derivative.
 
virtual std::shared_ptr< FunctionindefiniteIntegral () const =0
 Returns a Function representing the indefiniteIntegral.
 
double integrate (const double x1, const double x2) const final
 
- Public Member Functions inherited from Euclid::MathUtils::Integrable
virtual ~Integrable ()=default
 Default destructor.
 
- Public Member Functions inherited from Euclid::MathUtils::NAryFunction< N >
virtual std::unique_ptr< NAryFunctionclone () const =0
 

Detailed Description

Interface representing a differentiable function.

A function is differentiable if its derivative and indefinite integrals can be calculated in a fast, analytical way. The implementations of this interface should implement the derivative() and indefiniteIntegral() functions accordingly. Note that the Differentiable class implements the Integrable interface by using the indefiniteIntegral().

Definition at line 49 of file Differentiable.h.

Constructor & Destructor Documentation

◆ ~Differentiable()

virtual Euclid::MathUtils::Differentiable::~Differentiable ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ derivative()

virtual std::shared_ptr< Function > Euclid::MathUtils::Differentiable::derivative ( ) const
pure virtual

Returns a Function representing the derivative.

Implemented in Euclid::MathUtils::Polynomial.

◆ indefiniteIntegral()

virtual std::shared_ptr< Function > Euclid::MathUtils::Differentiable::indefiniteIntegral ( ) const
pure virtual

Returns a Function representing the indefiniteIntegral.

Implemented in Euclid::MathUtils::Polynomial.

References Euclid::MathUtils::integrate().

Referenced by integrate().

Here is the call graph for this function:

◆ integrate()

double Euclid::MathUtils::Differentiable::integrate ( const double  x1,
const double  x2 
) const
finalvirtual

Calculates the integral in the range [x1,x2], by using the indefinite integral.

Parameters
x1The lower bound of the integration
x2The upper bound of the integration
Returns
The integral in the range [x1,x2]

Implements Euclid::MathUtils::Integrable.

Definition at line 30 of file Differentiable.cpp.

References indefiniteIntegral().

Here is the call graph for this function:

The documentation for this interface was generated from the following files: