libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::RealToRealFunction Class Reference

Numerical integration toolbox class. More...

#include <CRNRealToRealFunction.h>

+ Inheritance diagram for crn::RealToRealFunction:
+ Collaboration diagram for crn::RealToRealFunction:

Public Member Functions

 RealToRealFunction ()
 Default constructor. More...
 
 RealToRealFunction (double l, double u)
 Constructor. More...
 
 RealToRealFunction (const RealToRealFunction &F)
 
 RealToRealFunction (RealToRealFunction &&)=default
 
virtual ~RealToRealFunction () override
 Destructor. More...
 
RealToRealFunctionoperator= (const RealToRealFunction &)=delete
 
RealToRealFunctionoperator= (RealToRealFunction &&)=default
 
double GetLeftEndpoint () const noexcept
 Returns the beginning of the definition interval. More...
 
double GetRightEndpoint () const noexcept
 Returns the end of the definition interval. More...
 
SCMatrixDouble GetImage () const
 Returns the image of the function. More...
 
size_t GetImageSize () const noexcept
 Returns the number of elements modelized in the image. More...
 
double At (size_t k) const
 Returns an given image. More...
 
void SetLeftEndpoint (double d) noexcept
 Sets the beginning of the definition interval. More...
 
void SetRightEndpoint (double d) noexcept
 Sets the end of the definition interval. More...
 
void SetElement (size_t k, double v)
 Sets a given image. More...
 
void SetImageSize (size_t s)
 Sets the number of elements to be modelized if the image. More...
 
double Evaluate (double x) const
 Evaluates the image a given point. More...
 
MatrixDouble MakePreimage (double y) const
 Finds the possible preimages of a given image value. More...
 
double TrapezoidIntegral () const
 Evaluates the integral with the trapezoid method. More...
 
- Public Member Functions inherited from crn::Object
virtual ~Object ()=default
 

Detailed Description

Numerical integration toolbox class.

Tools for numerical integration

Author
Jean DUONG
Date
January 2009
Version
0.2

Definition at line 41 of file CRNRealToRealFunction.h.

Constructor & Destructor Documentation

crn::RealToRealFunction::RealToRealFunction ( )
inline

Default constructor.

Definition at line 46 of file CRNRealToRealFunction.h.

RealToRealFunction::RealToRealFunction ( double  l,
double  r 
)

Constructor.

Constructor

Parameters
[in]lleft end point
[in]rright end point

Definition at line 33 of file CRNRealToRealFunction.cpp.

RealToRealFunction::RealToRealFunction ( const RealToRealFunction F)

Constructor

Parameters
[in]Fa function to copy

Definition at line 43 of file CRNRealToRealFunction.cpp.

crn::RealToRealFunction::RealToRealFunction ( RealToRealFunction &&  )
default
RealToRealFunction::~RealToRealFunction ( )
overridevirtual

Destructor.

Destructor

Definition at line 54 of file CRNRealToRealFunction.cpp.

Member Function Documentation

double crn::RealToRealFunction::At ( size_t  k) const
inline

Returns an given image.

Definition at line 67 of file CRNRealToRealFunction.h.

double RealToRealFunction::Evaluate ( double  x) const

Evaluates the image a given point.

Compute value of the image of a given point

Parameters
[in]xthe point to evaluate
Returns
the computed image

Definition at line 127 of file CRNRealToRealFunction.cpp.

SCMatrixDouble crn::RealToRealFunction::GetImage ( ) const
inline

Returns the image of the function.

Definition at line 63 of file CRNRealToRealFunction.h.

size_t crn::RealToRealFunction::GetImageSize ( ) const
inlinenoexcept

Returns the number of elements modelized in the image.

Definition at line 65 of file CRNRealToRealFunction.h.

double crn::RealToRealFunction::GetLeftEndpoint ( ) const
inlinenoexcept

Returns the beginning of the definition interval.

Definition at line 59 of file CRNRealToRealFunction.h.

double crn::RealToRealFunction::GetRightEndpoint ( ) const
inlinenoexcept

Returns the end of the definition interval.

Definition at line 61 of file CRNRealToRealFunction.h.

MatrixDouble RealToRealFunction::MakePreimage ( double  y) const

Finds the possible preimages of a given image value.

Get the possible preimages of a given image value

Exceptions
ExceptionNotFoundno preimage found
Parameters
[in]ythe image
Returns
a line matrix containing the possible preimages

Definition at line 158 of file CRNRealToRealFunction.cpp.

RealToRealFunction& crn::RealToRealFunction::operator= ( const RealToRealFunction )
delete
RealToRealFunction& crn::RealToRealFunction::operator= ( RealToRealFunction &&  )
default
void RealToRealFunction::SetElement ( size_t  k,
double  v 
)

Sets a given image.

Define value of the k-th point in domain

Parameters
[in]kindex
[in]vvalue

Definition at line 106 of file CRNRealToRealFunction.cpp.

void RealToRealFunction::SetImageSize ( size_t  s)

Sets the number of elements to be modelized if the image.

Define the number of data points in domain

Parameters
[in]snew size

Definition at line 116 of file CRNRealToRealFunction.cpp.

void RealToRealFunction::SetLeftEndpoint ( double  d)
noexcept

Sets the beginning of the definition interval.

Set left endpoint for function domain

Parameters
[in]dthe new end point

Definition at line 62 of file CRNRealToRealFunction.cpp.

void RealToRealFunction::SetRightEndpoint ( double  d)
noexcept

Sets the end of the definition interval.

Set right endpoint for function domain

Parameters
[in]dthe new end point

Definition at line 72 of file CRNRealToRealFunction.cpp.

double RealToRealFunction::TrapezoidIntegral ( ) const

Evaluates the integral with the trapezoid method.

Perform numerical integration over the entire domain using trapezoids

Returns
the integral value

Definition at line 82 of file CRNRealToRealFunction.cpp.


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