IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Interface for real functions. More...
Public Member Functions | |
double | Value (double x) |
Returns the value of this function at the specified parameter. | |
double | Derivative (double x) |
Returns the first derivative of this function at the specified parameter. | |
double | Derivative (double x, int order) |
Returns the derivative of the given order of this function at the specified parameter. | |
bool | HigherDerivativeDefined (int order) |
Tells whether the derivative of the given order is defined for this function (by implementation, not mathematically) | |
double | SecondDerivative (double x) |
Returns the second derivative of the given order of this function at the specified arameter. | |
double | Integral (double x) |
Returns integral from 0 to x of the function. Throws an exception if the integral is not defined. | |
double | Inverse (double y) |
Returns Inverse of the current function applied to function argument. Throws an exception if the inverse function is not defined. | |
void | Tabulate (double from, double to, int numPoints) |
Tabulates the current function and its first and second derivatives (when available) on the specified interval, in the specified number of points. | |
void | Tabulate (double from, double to, int numPoints, bool printDerivatives) |
Tabulates the current function and its first and eventually second derivatives (when available) on the specified interval, in the specified number of points. | |
void | Tabulate (double from, double to, int numPoints, bool printDerivatives, bool printSecondDerivatives) |
Tabulates the current function and eventually its first and second derivatives (when available) on the specified interval, in the specified number of points. | |
double | NumericalIntegral (double from, double to, int numintervals) |
Calculates numerical integral of this function. Simpson's formula is usually used. | |
double | NumericalDerivative (double x, double stepsize) |
Calculates numerical derivative of this function. Central difference formula is used. | |
double | NumericalSecondDerivative (double x, double stepsize) |
Calculates numerical second order derivative of this function. Central difference formula is used. | |
Properties | |
string | Name [get] |
Returns a short name of the function. | |
string | Description [get] |
Returns a short description of the function. | |
bool | ValueDefined [get] |
Tells whether value of the function is defined by implementation. | |
bool | DerivativeDefined [get] |
Tells whether the first derivative is defined for this function (by implementation, not mathematically) | |
bool | SecondDerivativeDefined [get] |
Tells whether the second derivative is defined for this function (by implementation, not mathematically) | |
bool | IntegralDefined [get] |
Tells whether analytical itegral of the function is defined or not. | |
bool | InverseDefined [get] |
Tells whether analytical inverse function is defined or not. |
Interface for real functions.
$A Igor xx;
double IG::Num::IRealFunction::Value | ( | double | x | ) |
Returns the value of this function at the specified parameter.
Implemented in IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Gr::PlotterZedGraph::ExampleSineFunctionForLissajous, IG::Gr3d::VtkPlotBase::ExampleSineFunctionForLissajous, and IG::Gr3d::VtkPlotBase::ExampleFunctionTorusKnot.
double IG::Num::IRealFunction::Derivative | ( | double | x | ) |
Returns the first derivative of this function at the specified parameter.
Implemented in IG::Num::RealFunctionBase, and IG::Num::RealFunction.
double IG::Num::IRealFunction::Derivative | ( | double | x, |
int | order | ||
) |
Returns the derivative of the given order of this function at the specified parameter.
Implemented in IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::Func::Identity, and IG::Num::Func::Constant.
bool IG::Num::IRealFunction::HigherDerivativeDefined | ( | int | order | ) |
Tells whether the derivative of the given order is defined for this function (by implementation, not mathematically)
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::FunctionPolynomial, IG::Num::Func::Exp, IG::Num::Func::ReciprocalPower, IG::Num::Func::Identity, IG::Num::Func::Constant, IG::Num::Func::Linear, IG::Num::Func::Quadratic, IG::Num::Func::Cubic, IG::Num::Func::PenaltyPower, IG::Num::Func::WeightGauss, IG::Num::Func::WeightReciprocalPower, IG::Num::Func::WeightPol3, IG::Num::Func::WeightPol4, IG::Num::Func::WeightPol5, and IG::Num::Func::WeightPol7.
double IG::Num::IRealFunction::SecondDerivative | ( | double | x | ) |
Returns the second derivative of the given order of this function at the specified arameter.
Implemented in IG::Num::RealFunctionBase, and IG::Num::RealFunction.
double IG::Num::IRealFunction::Integral | ( | double | x | ) |
Returns integral from 0 to x of the function. Throws an exception if the integral is not defined.
x | Upper bound of the integral. |
Implemented in IG::Num::RealFunctionBase, and IG::Num::RealFunction.
double IG::Num::IRealFunction::Inverse | ( | double | y | ) |
Returns Inverse of the current function applied to function argument. Throws an exception if the inverse function is not defined.
Implemented in IG::Num::RealFunctionBase, and IG::Num::RealFunction.
void IG::Num::IRealFunction::Tabulate | ( | double | from, |
double | to, | ||
int | numPoints | ||
) |
Tabulates the current function and its first and second derivatives (when available) on the specified interval, in the specified number of points.
from | Left interval bound. |
to | Right interval bound. |
numPoints | Number of points in which the function is calculated. |
Implemented in IG::Num::RealFunctionBase.
void IG::Num::IRealFunction::Tabulate | ( | double | from, |
double | to, | ||
int | numPoints, | ||
bool | printDerivatives | ||
) |
Tabulates the current function and its first and eventually second derivatives (when available) on the specified interval, in the specified number of points.
from | Left interval bound. |
to | Right interval bound. |
numPoints | Number of points in which the function is calculated. |
printSecondDerivatives | Whether to print the second derivatives. |
Implemented in IG::Num::RealFunctionBase.
void IG::Num::IRealFunction::Tabulate | ( | double | from, |
double | to, | ||
int | numPoints, | ||
bool | printDerivatives, | ||
bool | printSecondDerivatives | ||
) |
Tabulates the current function and eventually its first and second derivatives (when available) on the specified interval, in the specified number of points.
from | Left interval bound. |
to | Right interval bound. |
numPoints | Number of points in which the function is calculated. |
printDerivatives | Whether to print the derivatives. |
printSecondDerivatives | Whether to print the second derivatives. |
Implemented in IG::Num::RealFunctionBase.
double IG::Num::IRealFunction::NumericalIntegral | ( | double | from, |
double | to, | ||
int | numintervals | ||
) |
Calculates numerical integral of this function. Simpson's formula is usually used.
from | Lower integral limit. |
to | Upper integral limit. |
numintervals | Number of subintervals (1 less thatn the number of evaluation points) |
Implemented in IG::Num::RealFunctionBase.
double IG::Num::IRealFunction::NumericalDerivative | ( | double | x, |
double | stepsize | ||
) |
Calculates numerical derivative of this function. Central difference formula is used.
x | Point at which derivative is calculated. |
stepsize | Step size. |
Implemented in IG::Num::RealFunctionBase.
double IG::Num::IRealFunction::NumericalSecondDerivative | ( | double | x, |
double | stepsize | ||
) |
Calculates numerical second order derivative of this function. Central difference formula is used.
x | Point at which second order derivative is calculated. |
stepsize | Step size. |
Implemented in IG::Num::RealFunctionBase.
string IG::Num::IRealFunction::Name [get] |
Returns a short name of the function.
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, and IG::Num::RealFunction.
string IG::Num::IRealFunction::Description [get] |
Returns a short description of the function.
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, and IG::Num::RealFunction.
bool IG::Num::IRealFunction::ValueDefined [get] |
Tells whether value of the function is defined by implementation.
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::FunctionPolynomial, IG::Num::Func::Exp, IG::Num::Func::ReciprocalPower, IG::Num::Func::Identity, IG::Num::Func::Constant, IG::Num::Func::Linear, IG::Num::Func::Quadratic, IG::Num::Func::Cubic, IG::Num::Func::PenaltyPower, IG::Num::Func::WeightGauss, IG::Num::Func::WeightReciprocalPower, IG::Num::Func::WeightPol3, IG::Num::Func::WeightPol4, IG::Num::Func::WeightPol5, and IG::Num::Func::WeightPol7.
bool IG::Num::IRealFunction::DerivativeDefined [get] |
Tells whether the first derivative is defined for this function (by implementation, not mathematically)
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::FunctionPolynomial, IG::Num::Func::Exp, IG::Num::Func::ReciprocalPower, IG::Num::Func::Identity, IG::Num::Func::Constant, IG::Num::Func::Linear, IG::Num::Func::Quadratic, IG::Num::Func::Cubic, IG::Num::Func::PenaltyPower, IG::Num::Func::WeightGauss, IG::Num::Func::WeightReciprocalPower, IG::Num::Func::WeightPol3, IG::Num::Func::WeightPol4, IG::Num::Func::WeightPol5, and IG::Num::Func::WeightPol7.
bool IG::Num::IRealFunction::SecondDerivativeDefined [get] |
Tells whether the second derivative is defined for this function (by implementation, not mathematically)
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::FunctionPolynomial, IG::Num::Func::Exp, IG::Num::Func::ReciprocalPower, IG::Num::Func::Identity, IG::Num::Func::Constant, IG::Num::Func::Linear, IG::Num::Func::Quadratic, IG::Num::Func::Cubic, IG::Num::Func::PenaltyPower, IG::Num::Func::WeightGauss, IG::Num::Func::WeightReciprocalPower, IG::Num::Func::WeightPol3, IG::Num::Func::WeightPol4, IG::Num::Func::WeightPol5, and IG::Num::Func::WeightPol7.
bool IG::Num::IRealFunction::IntegralDefined [get] |
Tells whether analytical itegral of the function is defined or not.
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::FunctionPolynomial, IG::Num::Func::Exp, IG::Num::Func::ReciprocalPower, IG::Num::Func::Identity, IG::Num::Func::Constant, IG::Num::Func::Linear, IG::Num::Func::Quadratic, IG::Num::Func::Cubic, IG::Num::Func::PenaltyPower, IG::Num::Func::WeightGauss, IG::Num::Func::WeightReciprocalPower, IG::Num::Func::WeightPol3, IG::Num::Func::WeightPol4, IG::Num::Func::WeightPol5, and IG::Num::Func::WeightPol7.
bool IG::Num::IRealFunction::InverseDefined [get] |
Tells whether analytical inverse function is defined or not.
Implemented in IG::Lib::LoadableRealFunctionBase, IG::Num::RealFunctionBase, IG::Num::RealFunction, IG::Num::FunctionPolynomial, IG::Num::Func::Exp, IG::Num::Func::ReciprocalPower, IG::Num::Func::Identity, IG::Num::Func::Constant, IG::Num::Func::Linear, IG::Num::Func::Quadratic, IG::Num::Func::Cubic, IG::Num::Func::PenaltyPower, IG::Num::Func::WeightGauss, IG::Num::Func::WeightReciprocalPower, IG::Num::Func::WeightPol3, IG::Num::Func::WeightPol4, IG::Num::Func::WeightPol5, and IG::Num::Func::WeightPol7.