CFL
Classes | Functions
One-dimensional function object.
Collaboration diagram for One-dimensional function object.:

Classes

class  cfl::Function
 Concrete class for a one-dimensional function. More...
 
class  cfl::IFunction
 Interface for a one-dimensional function. More...
 

Functions

Function cfl::abs (const Function &rF)
 
Function cfl::exp (const Function &rF)
 
Function cfl::log (const Function &rF)
 
Function cfl::max (const Function &rF, const Function &rG)
 
Function cfl::max (double dV, const Function &rF)
 
Function cfl::max (const Function &rF, double dV)
 
Function cfl::min (const Function &rF, const Function &rG)
 
Function cfl::min (double dV, const Function &rF)
 
Function cfl::min (const Function &rF, double dV)
 
Function cfl::operator* (const Function &rF, const Function &rG)
 
Function cfl::operator* (double dV, const Function &rF)
 
Function cfl::operator* (const Function &rF, double dV)
 
Function cfl::operator+ (const Function &rF, const Function &rG)
 
Function cfl::operator+ (double dV, const Function &rF)
 
Function cfl::operator+ (const Function &rF, double dV)
 
Function cfl::operator- (const Function &rF)
 
Function cfl::operator- (const Function &rF, const Function &rG)
 
Function cfl::operator- (double dV, const Function &rF)
 
Function cfl::operator- (const Function &rF, double dV)
 
Function cfl::operator/ (const Function &rF, const Function &rG)
 
Function cfl::operator/ (double dV, const Function &rF)
 
Function cfl::operator/ (const Function &rF, double dV)
 
Function cfl::pow (const Function &rF, double dV)
 
Function cfl::sqrt (const Function &rF)
 
template<class F >
Function cfl::toFunction (const F &rF, double dLeft=-std::numeric_limits< double >::infinity(), double dRight=std::numeric_limits< double >::infinity())
 
Function cfl::toFunction (const MultiFunction &rF, unsigned iArg=0, const std::valarray< double > &rOtherArg=std::valarray< double >())
 

Detailed Description

This module deals with a one-dimensional function object.

Function Documentation

Function cfl::abs ( const Function rF)

Returns the absolute value of rF. The result contains a deep copy of rF. The domain of the result equals the domain of rF.

Parameters
rFThe function which absolute value is computed.
Returns
The absolute value of rF.
Function cfl::exp ( const Function rF)

Returns the exponent of rF. The result contains a deep copy of rF. The domain of the result equals the domain of rF.

Parameters
rFThe function which exponent is computed.
Returns
The exponent of rF.
Function cfl::log ( const Function rF)

Returns the logarithm of rF. The result contains a deep copy of rF. The domain of the result equals the domain of rF.

Parameters
rFThe function which logarithm is computed.
Returns
The logarithm of rF.
Function cfl::max ( const Function rF,
const Function rG 
)

Returns the maximum rF and rG. The result contains deep copies of rF and rG. The domain of the result equals the intersection of the domains of rF and rG.

Parameters
rFFirst function in the maximum.
rGSecond function in the maximum.
Returns
The function given by max(rF,rG)
Function cfl::max ( double  dV,
const Function rF 
)

Returns the maximum of dV and rF. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
dVThe number-term of the maximum.
rFThe function-term of the maximum.
Returns
The function given by max(dV,rF)
Function cfl::max ( const Function rF,
double  dV 
)

Returns the maximum of rF and dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function-term of the maximum.
dVThe number-term of the maximum.
Returns
The function given by max(rF,dV)
Function cfl::min ( const Function rF,
const Function rG 
)

Returns the minimum of rF and rG. The result contains deep copies of rF and rG. The domain of the result equals the intersection of the domains of rF and rG.

Parameters
rFThe first function in the minimum.
rGThe second term in the minimum.
Returns
The function given by min(rF,rG)
Function cfl::min ( double  dV,
const Function rF 
)

Returns the minimum of dV and rF. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
dVThe number-term of the minimum.
rFThe function-term of the minimum.
Returns
The function given by min(dV,rF)
Function cfl::min ( const Function rF,
double  dV 
)

Returns the minimum of rF and dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function-term of the maximum.
dVThe number-term of the maximum.
Returns
The function given by min(rF,dV)
Function cfl::operator* ( const Function rF,
const Function rG 
)

Returns the product of rF and rG. The result contains deep copies of rF and rG. The domain of the result equals the intersection of the domains of rF and rG.

Parameters
rFFirst function multiplier.
rGSecond function multiplier.
Returns
The function given by rF*rG
Function cfl::operator* ( double  dV,
const Function rF 
)

Returns the product of dV and rF. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
dVThe multiplier number.
rFThe multiplier function.
Returns
The function given by dV*rF
Function cfl::operator* ( const Function rF,
double  dV 
)

Returns the product of rF and dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function multiplier.
dVThe number multiplier.
Returns
The function given by rF*dV
Function cfl::operator+ ( const Function rF,
const Function rG 
)

Returns the sum of rF and rG. The result contains deep copies of rF and rG. The domain of the result equals the intersection of the domains of rF and rG.

Parameters
rFFirst element of the sum.
rGSecond element of the sum.
Returns
The function given by rF+rG
Function cfl::operator+ ( double  dV,
const Function rF 
)

Returns the sum of dV and rF. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
dVThe number-term of the sum.
rFThe function-term of the sum.
Returns
The function given by dV+rF
Function cfl::operator+ ( const Function rF,
double  dV 
)

Returns the sum of rF and dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function-term of the sum.
dVThe number-term of the sum.
Returns
The function given by rF+dV
Function cfl::operator- ( const Function rF)

Returns minus rF. The result contains a deep copy of rF. The domain of the result equals the domain of rF.

Parameters
rFA function object which minus is computed.
Returns
The function given by -rF
Function cfl::operator- ( const Function rF,
const Function rG 
)

Returns the difference between rF and rG. The result contains deep copies of rF and rG. The domain of the result equals the intersection of the domains of rF and rG.

Parameters
rFThe function from which we subtract.
rGThe function which is subtracted.
Returns
The function given by rF-rG
Function cfl::operator- ( double  dV,
const Function rF 
)

Returns the difference between dV and rF. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
dVThe number from which we subtract.
rFThe function which is subtracted.
Returns
The function given by dV-rF
Function cfl::operator- ( const Function rF,
double  dV 
)

Returns the difference between rF and dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function from which we subtract.
dVThe number which is subtracted.
Returns
The function given by rF-dV
Function cfl::operator/ ( const Function rF,
const Function rG 
)

Returns the ratio of rF and rG. The result contains deep copies of rF and rG. The domain of the result equals the intersection of the domains of rF and rG.

Parameters
rFThe function which is divided.
rGThe divisor function.
Returns
The function given by rF/rG
Function cfl::operator/ ( double  dV,
const Function rF 
)

Returns the ratio of dV and rF. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
dVThe number which is divided.
rFThe divisor function.
Returns
The function given by dV/rF
Function cfl::operator/ ( const Function rF,
double  dV 
)

Returns the ratio of rF and dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function which is divided.
dVThe divisor number.
Returns
The function given by rF/dV
Function cfl::pow ( const Function rF,
double  dV 
)

Returns rF in the power dV. The result contains a deep copy of rF. The domain of the result equals that of rF.

Parameters
rFThe function-base.
dVThe number-exponent.
Returns
The function rF in the power dV.
Function cfl::sqrt ( const Function rF)

Returns the squire root of rF. The result contains the a deep copy of rF. The domain of the result equals the domain of rF.

Parameters
rFThe function which square root is computed.
Returns
The square root of rF.
template<class F >
Function cfl::toFunction ( const F &  rF,
double  dLeft = -std::numeric_limits< double >::infinity(),
double  dRight = std::numeric_limits< double >::infinity() 
)

Constructs *this from a unary function object of STL library. The types of argument and value of the unary function should allow implicit conversion to double. A deep copy of rF is created in the result.

Parameters
rFA unary function object from STL library.
dLeftThe left point of the domain of the function.
dRightThe right point of the domain of the function.
Returns
A standard one-dimensional function object in the library which represents the function rF.
Function cfl::toFunction ( const MultiFunction rF,
unsigned  iArg = 0,
const std::valarray< double > &  rOtherArg = std::valarray< double >() 
)

Returns the restriction of the multi-dimensional function rF to the one-dimensional region defined as the intersection of the domain of rF with the line where the coordinate with index iArg is flexible and all other coordinates equal rOtherArg .

Parameters
rFConstant reference to a multi-dimensional function object.
iArgThe index of flexible coordinate.
rOtherArgThe values of fixed coordinates.
Returns
A standard one-dimensional function object in the library which represents the restriction of the multi-dimensional function rF to a one-dimensional domain.