Alexandria  2.19
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Euclid::MathUtils::Function Interface Referenceabstract

Interface class representing a function. More...

#include <Function.h>

Inheritance diagram for Euclid::MathUtils::Function:
[legend]

Public Member Functions

virtual ~Function ()=default
 Default destructor. More...
 
virtual double operator() (const double x) const =0
 
virtual std::unique_ptr< Functionclone () const =0
 

Detailed Description

Interface class representing a function.

A function is an object which can convert a value from domain X to a value of domain Y. This interface is the root of a hierarchy of classes which perform such conversions, with the parenthesis operator. Because this class is designed for inheritance, it requires the implementation of the clone() method for copying functions when a reference of type Function is used.

Definition at line 46 of file Function.h.

Constructor & Destructor Documentation

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

Default destructor.

Member Function Documentation

virtual std::unique_ptr<Function> Euclid::MathUtils::Function::clone ( ) const
pure virtual

Creates a clone of the function object. All subclasses must implement this method, to enable copying of Function objects when only a reference to the Function class is available.

Returns
A copy of the Function object

Implemented in Euclid::MathUtils::Piecewise, Euclid::MathUtils::FunctionAdapter, Euclid::MathUtils::Polynomial, and Euclid::MathUtils::DefaultMultiplication.

Referenced by Euclid::MathUtils::DefaultMultiplication::DefaultMultiplication().

virtual double Euclid::MathUtils::Function::operator() ( const double  x) const
pure virtual

Converts the value x from the input domain to the output domain.

Parameters
xThe value to convert
Returns
The value of the output domain

Implemented in Euclid::MathUtils::Piecewise, Euclid::MathUtils::FunctionAdapter, Euclid::MathUtils::Polynomial, and Euclid::MathUtils::DefaultMultiplication.


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