Alexandria  2.16
Please provide a description of the project.
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:
[legend]
Collaboration diagram for Euclid::MathUtils::Differentiable:
[legend]

Public Member Functions

virtual ~Differentiable ()
 Default destructor. More...
 
virtual std::shared_ptr< Functionderivative () const =0
 Returns a Function representing the derivative. More...
 
virtual std::shared_ptr< FunctionindefiniteIntegral () const =0
 Returns a Function representing the indefiniteIntegral. More...
 
double integrate (const double x1, const double x2) const final
 
- Public Member Functions inherited from Euclid::MathUtils::Integrable
virtual ~Integrable ()=default
 Default destructor. More...
 
- Public Member Functions inherited from Euclid::MathUtils::Function
virtual ~Function ()=default
 Default destructor. More...
 
virtual double operator() (const double x) const =0
 
virtual std::unique_ptr< Functionclone () 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 ( )
inlinevirtual

Default destructor.

Definition at line 52 of file Differentiable.h.

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.

Referenced by integrate().

◆ 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: