IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Num::Func::Linear Class Reference

Linear function, f(x) = a1*x + a0. Specific properties: Zero - returns a zero. HasZero - either the function has a zero or not. More...

Inheritance diagram for IG::Num::Func::Linear:
Collaboration diagram for IG::Num::Func::Linear:

List of all members.

Public Member Functions

 Linear (double a1, double a0)
 Creates a linear function, coefficients are specified in the descending order.
void SetCoefficients (double a1, double a0)
 Sets coefficients of the linear function represented by the current object.
void SetInterpolation (double x1, double y1, double x2, double y2)
 Initializes the linear interpolation function with specified two values.
void SetInterpolation (double x1, double y1, double d1)
 Initializes the linear interpolation function with specified value and derivative.
override bool HigherDerivativeDefined (int order)
 Tells whether the derivative of the given order is defined for this function (by implementation, not mathematically). Returns true if either the internal variable indicates true or the appropriate delegate is non-null.

Protected Member Functions

override double RefValue (double x)
 Returns the value of reference (untransformed) function.
override double RefDerivative (double x)
 Returns the first derivative of reference (untransformed) function.
override double RefSecondDerivative (double x)
 Returns the second derivative of the given order of reference (untransformed) function.
override double RefDerivative (double x, int order)
 Returns the derivative of the given order of reference (untransformed) function.
internal override void setHighestDerivativeDefined (int order)
 Sets the internal variable that specifies which is the highest order derivative devined (-1 for unlimited).
override double RefIntegral (double x)
 Returns definite integral of reference (untransformed) function from 0 to the function argument.
override double RefInverse (double x)
 Returns inverse of the reference (untransformed) function.

Protected Attributes

double _a0

Properties

double a0 [get, set]
 Returns the constant term coefficient of the linear function.
double a1 [get, set]
 Returns the linear term coefficitne of the linear function.
double Zero [get]
 Returns zero of the current linear function. Throws InvalidOperationException if the function does not have zeros.
bool HasZero [get]
 Returns true if the linear function has a zero, false otherwise.
override bool ValueDefined [get, set]
 Tells whether value of the function is defined by implementation. Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).
override bool DerivativeDefined [get, set]
 Tells whether the first derivative is defined for this function (by implementation, not mathematically). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).
override bool SecondDerivativeDefined [get, set]
 Tells whether the second derivative is defined for this function (by implementation, not mathematically). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).
override bool IntegralDefined [get, set]
 Indicates whether integral is defined for this function (w.r. implementation). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).
override bool InverseDefined [get, set]
 Indicates whether inverse is defined for this function (w.r. implementation). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).

Private Attributes

double _a1

Detailed Description

Linear function, f(x) = a1*x + a0. Specific properties: Zero - returns a zero. HasZero - either the function has a zero or not.


Constructor & Destructor Documentation

IG::Num::Func::Linear::Linear ( double  a1,
double  a0 
) [inline]

Creates a linear function, coefficients are specified in the descending order.

Parameters:
a1Linear term coefficient.
a0Constant term coefficient.

Member Function Documentation

void IG::Num::Func::Linear::SetCoefficients ( double  a1,
double  a0 
) [inline]

Sets coefficients of the linear function represented by the current object.

Parameters:
a1
a0
void IG::Num::Func::Linear::SetInterpolation ( double  x1,
double  y1,
double  x2,
double  y2 
) [inline]

Initializes the linear interpolation function with specified two values.

Parameters:
x1Abscissa of the first point.
y1Value at the first point.
x2Abscissa of the second point.
y2Value at the second point.
void IG::Num::Func::Linear::SetInterpolation ( double  x1,
double  y1,
double  d1 
) [inline]

Initializes the linear interpolation function with specified value and derivative.

Parameters:
x1Abscissa of the first point.
y1Value at the first point.
d1Derivative at the first point.
override double IG::Num::Func::Linear::RefValue ( double  x) [inline, protected, virtual]

Returns the value of reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.

override double IG::Num::Func::Linear::RefDerivative ( double  x) [inline, protected, virtual]

Returns the first derivative of reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.

override double IG::Num::Func::Linear::RefSecondDerivative ( double  x) [inline, protected, virtual]

Returns the second derivative of the given order of reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.

override double IG::Num::Func::Linear::RefDerivative ( double  x,
int  order 
) [inline, protected, virtual]

Returns the derivative of the given order of reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.

override bool IG::Num::Func::Linear::HigherDerivativeDefined ( int  order) [inline]

Tells whether the derivative of the given order is defined for this function (by implementation, not mathematically). Returns true if either the internal variable indicates true or the appropriate delegate is non-null.

Reimplemented from IG::Num::RealFunction.

internal override void IG::Num::Func::Linear::setHighestDerivativeDefined ( int  order) [inline, protected, virtual]

Sets the internal variable that specifies which is the highest order derivative devined (-1 for unlimited).

Parameters:
orderHighest order for which derivative is defined. -1 means that all derivatives are defined.

Reimplemented from IG::Num::RealFunction.

override double IG::Num::Func::Linear::RefIntegral ( double  x) [inline, protected, virtual]

Returns definite integral of reference (untransformed) function from 0 to the function argument.

Reimplemented from IG::Num::RealFunction.

override double IG::Num::Func::Linear::RefInverse ( double  y) [inline, protected, virtual]

Returns inverse of the reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.


Member Data Documentation

double IG::Num::Func::Linear::_a0 [protected]
double IG::Num::Func::Linear::_a1 [private]

Property Documentation

double IG::Num::Func::Linear::a0 [get, set]

Returns the constant term coefficient of the linear function.

double IG::Num::Func::Linear::a1 [get, set]

Returns the linear term coefficitne of the linear function.

double IG::Num::Func::Linear::Zero [get]

Returns zero of the current linear function. Throws InvalidOperationException if the function does not have zeros.

bool IG::Num::Func::Linear::HasZero [get]

Returns true if the linear function has a zero, false otherwise.

override bool IG::Num::Func::Linear::ValueDefined [get, set]

Tells whether value of the function is defined by implementation. Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).

Reimplemented from IG::Num::RealFunction.

override bool IG::Num::Func::Linear::DerivativeDefined [get, set]

Tells whether the first derivative is defined for this function (by implementation, not mathematically). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).

Reimplemented from IG::Num::RealFunction.

override bool IG::Num::Func::Linear::SecondDerivativeDefined [get, set]

Tells whether the second derivative is defined for this function (by implementation, not mathematically). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).

Reimplemented from IG::Num::RealFunction.

override bool IG::Num::Func::Linear::IntegralDefined [get, set]

Indicates whether integral is defined for this function (w.r. implementation). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).

Reimplemented from IG::Num::RealFunction.

override bool IG::Num::Func::Linear::InverseDefined [get, set]

Indicates whether inverse is defined for this function (w.r. implementation). Getter returns true if internal flag is set OR appropriate delegate is defined. Setter sets the internal flag (i.e. delegate must also be set to null if getter should return false).

Reimplemented from IG::Num::RealFunction.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events