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

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

# IG::Num::Func::PenaltyPower Class Reference

Penalty function consisting of sticked together constant zero-valued function and a power function with positive integer exponent. Formula: hh*((x - xx0)/dd)^pp where: dd: Characteristic barrier length. Length of the interval on which function grows from 0 to characteristic height. hh: Characteristic barrier height. Value of the function at transition point plus characteristic length. xx0: Transition point where function starts to be non-zero. pp: Power. Must be greater than 0; for 2 first derivative is continuous in transition points, for 3 second derivative is also continuous, etc. More...

Inheritance diagram for IG::Num::Func::PenaltyPower:
[legend]
Collaboration diagram for IG::Num::Func::PenaltyPower:
[legend]

List of all members.

## Public Member Functions
| PenaltyPower (double length, double height, int power)
| Creates a new penalty function consisting of sticked together constant zero-valued function and a power function with positive integer exponent. Transition pint where function starts to be non-zero is at negative characteristic length.
| PenaltyPower (double length, double height, double zeroEnd, int power)
| Creates a new penalty function consisting of sticked together constant zero-valued function and a power function with positive integer exponent.
override bool | HigherDerivativeDefined (int order)
| Tells whether the derivative of the given order is defined for this function (by implementation, not mathematically)
## 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 y)
| Returns inverse of the reference (untransformed) function.
## Properties
bool | IsFiniteSupport`[get]`
| Whether penalty function has finite support (meaning that it is 0 for all arguments less than some specific value).
bool | IsAbsoluteDifferentiable`[get]`
| True if absolute value is differentiable, false otherwise. Differentiability of absolute value at 0 is important for penalty functions used for equality constraints.
bool | IsAbsoluteTwiceDifferentiable`[get]`
| True if absolute value is twoce differentiable, false otherwise. Differentiability of absolute value at 0 is important for penalty functions used for equality constraints.
bool | CanSetMaxZero`[get]`
| Whether maximal value for which penalty function is zero can be set.
bool | CanSetBarrierLength`[get]`
| Whether the gap can be set.
bool | CanSetBarrierHeight`[get]`
| Whether the height can be set.
double | MaxZero`[get, set]`
| Maximal value for which penalty function is zero.
double | BarrierLength`[get, set]`
| Gap - characteristic length of transition area on which penalty function grows for about (or sometimes exactly, especially in case of finite support) characteristic height.
double | BarrierHeight`[get, set]`
| Characteristic heitht of transition area, usually value of the penalty function at the end of transition area.
override bool | ValueDefined`[get, set]`
| Tells whether value of the function is defined by implementation.
override bool | DerivativeDefined`[get, set]`
| Tells whether the first derivative is defined for this function (by implementation, not mathematically)
override bool | SecondDerivativeDefined`[get, set]`
| Tells whether the second derivative is defined for this function (by implementation, not mathematically)
override bool | IntegralDefined`[get, set]`
| Tells whether analytical itegral of the function is defined or not.
override bool | InverseDefined`[get, set]`
| Tells whether analytical inverse function is defined or not.
## Private Member Functions
double | Int0 (double tt)
| Returns integral for the function where x0 = 0.
## Private Attributes
double | dd
double | hh
double | xx0
double | pp

## Detailed Description

Penalty function consisting of sticked together constant zero-valued function and a power function with positive integer exponent. Formula: hh*((x - xx0)/dd)^pp where: dd: Characteristic barrier length. Length of the interval on which function grows from 0 to characteristic height. hh: Characteristic barrier height. Value of the function at transition point plus characteristic length. xx0: Transition point where function starts to be non-zero. pp: Power. Must be greater than 0; for 2 first derivative is continuous in transition points, for 3 second derivative is also continuous, etc.

## Constructor & Destructor Documentation

IG::Num::Func::PenaltyPower::PenaltyPower | ( | double | length,
|  | double | height,
|  | int | power
| ) |  | `[inline]`

Creates a new penalty function consisting of sticked together constant zero-valued function and a power function with positive integer exponent. Transition pint where function starts to be non-zero is at negative characteristic length.

Parameters:

  length | Characteristic barrier length. Length of the interval on which function grows from 0 to characteristic height.
  height | Characteristic barrier height. Value of the function at transition point plus characteristic length.
  power | Power. Must be greater than 0, for 2 first derivative is continuous in transition points, for 3 second derivative is also continuous, etc.

IG::Num::Func::PenaltyPower::PenaltyPower | ( | double | length,
|  | double | height,
|  | double | zeroEnd,
|  | int | power
| ) |  | `[inline]`

Creates a new penalty function consisting of sticked together constant zero-valued function and a power function with positive integer exponent.

Parameters:

  length | Characteristic barrier length. Length of the interval on which function grows from 0 to characteristic height.
  height | Characteristic barrier height. Value of the function at transition point plus characteristic length.
  zeroEnd | Transition point where function starts to be non-zero.
  power | Power. Must be greater than 0, for 2 first derivative is continuous in transition points, for 3 second derivative is also continuous, etc.

## Member Function Documentation

override double IG::Num::Func::PenaltyPower::RefValue | ( | double | x | ) | `[inline, protected, virtual]`

Returns the value of reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.

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

Returns the first derivative of reference (untransformed) function.

Reimplemented from IG::Num::RealFunction.

override double IG::Num::Func::PenaltyPower::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::PenaltyPower::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::PenaltyPower::HigherDerivativeDefined | ( | int | order | ) | `[inline]`

Tells whether the derivative of the given order is defined for this function (by implementation, not mathematically)

Implements IG::Num::IRealFunction.

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

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

Parameters:

  order | Highest order for which derivative is defined. -1 means that all derivatives are defined.

Reimplemented from IG::Num::RealFunction.

double IG::Num::Func::PenaltyPower::Int0 | ( | double | tt | ) | `[inline, private]`

Returns integral for the function where x0 = 0.

override double IG::Num::Func::PenaltyPower::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::PenaltyPower::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::PenaltyPower::dd`[private]`

double IG::Num::Func::PenaltyPower::hh`[private]`

double IG::Num::Func::PenaltyPower::xx0`[private]`

double IG::Num::Func::PenaltyPower::pp`[private]`

## Property Documentation

bool IG::Num::Func::PenaltyPower::IsFiniteSupport`[get]`

Whether penalty function has finite support (meaning that it is 0 for all arguments less than some specific value).

Implements IG::Num::IRealFunctionPenalty.

bool IG::Num::Func::PenaltyPower::IsAbsoluteDifferentiable`[get]`

True if absolute value is differentiable, false otherwise. Differentiability of absolute value at 0 is important for penalty functions used for equality constraints.

Implements IG::Num::IRealFunctionPenalty.

bool IG::Num::Func::PenaltyPower::IsAbsoluteTwiceDifferentiable`[get]`

True if absolute value is twoce differentiable, false otherwise. Differentiability of absolute value at 0 is important for penalty functions used for equality constraints.

Implements IG::Num::IRealFunctionPenalty.

bool IG::Num::Func::PenaltyPower::CanSetMaxZero`[get]`

Whether maximal value for which penalty function is zero can be set.

Implements IG::Num::IRealFunctionPenalty.

bool IG::Num::Func::PenaltyPower::CanSetBarrierLength`[get]`

Whether the gap can be set.

Implements IG::Num::IRealFunctionPenalty.

bool IG::Num::Func::PenaltyPower::CanSetBarrierHeight`[get]`

Whether the height can be set.

Implements IG::Num::IRealFunctionPenalty.

double IG::Num::Func::PenaltyPower::MaxZero`[get, set]`

Maximal value for which penalty function is zero.

Implements IG::Num::IRealFunctionPenalty.

double IG::Num::Func::PenaltyPower::BarrierLength`[get, set]`

Gap - characteristic length of transition area on which penalty function grows for about (or sometimes exactly, especially in case of finite support) characteristic height.

Implements IG::Num::IRealFunctionPenalty.

double IG::Num::Func::PenaltyPower::BarrierHeight`[get, set]`

Characteristic heitht of transition area, usually value of the penalty function at the end of transition area.

Implements IG::Num::IRealFunctionPenalty.

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

Tells whether value of the function is defined by implementation.

Implements IG::Num::IRealFunction.

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

Tells whether the first derivative is defined for this function (by implementation, not mathematically)

Implements IG::Num::IRealFunction.

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

Tells whether the second derivative is defined for this function (by implementation, not mathematically)

Implements IG::Num::IRealFunction.

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

Tells whether analytical itegral of the function is defined or not.

Implements IG::Num::IRealFunction.

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

Tells whether analytical inverse function is defined or not.

Implements IG::Num::IRealFunction.

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

- FunctionRealPenalty.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events