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

Classes

class  cfl::IMultiFunction
 Interface for multi-dimensional function objects. More...
 
class  cfl::MultiFunction
 Standard concrete class for multi-dimensional function object. More...
 

Functions

MultiFunction cfl::abs (const MultiFunction &rF)
 
MultiFunction cfl::exp (const MultiFunction &rF)
 
MultiFunction cfl::log (const MultiFunction &rF)
 
MultiFunction cfl::max (const MultiFunction &rF, const MultiFunction &rG)
 
MultiFunction cfl::max (double dV, const MultiFunction &rF)
 
MultiFunction cfl::max (const MultiFunction &rF, double dV)
 
MultiFunction cfl::min (const MultiFunction &rF, const MultiFunction &rG)
 
MultiFunction cfl::min (double dV, const MultiFunction &rF)
 
MultiFunction cfl::min (const MultiFunction &rF, double dV)
 
MultiFunction cfl::operator* (const MultiFunction &rF, const MultiFunction &rG)
 
MultiFunction cfl::operator* (double dV, const MultiFunction &rF)
 
MultiFunction cfl::operator* (const MultiFunction &rF, double dV)
 
MultiFunction cfl::operator+ (const MultiFunction &rF, const MultiFunction &rG)
 
MultiFunction cfl::operator+ (double dV, const MultiFunction &rF)
 
MultiFunction cfl::operator+ (const MultiFunction &rF, double dV)
 
MultiFunction cfl::operator- (const MultiFunction &rF)
 
MultiFunction cfl::operator- (const MultiFunction &rF, const MultiFunction &rG)
 
MultiFunction cfl::operator- (double dV, const MultiFunction &rF)
 
MultiFunction cfl::operator- (const MultiFunction &rF, double dV)
 
MultiFunction cfl::operator/ (const MultiFunction &rF, const MultiFunction &rG)
 
MultiFunction cfl::operator/ (double dV, const MultiFunction &rF)
 
MultiFunction cfl::operator/ (const MultiFunction &rF, double dV)
 
MultiFunction cfl::pow (const MultiFunction &rF, double dV)
 
MultiFunction cfl::sqrt (const MultiFunction &rF)
 
MultiFunction cfl::toMultiFunction (double(*f)(const std::valarray< double > &), bool(*g)(const std::valarray< double > &), unsigned iDim)
 
MultiFunction cfl::toMultiFunction (const Function &rF, unsigned iArg, unsigned iDim)
 
MultiFunction cfl::toMultiFunction (const MultiFunction &rF, const std::vector< unsigned > &rArg, const std::valarray< double > &rOtherArg)
 

Detailed Description

This module deals with a multi-dimensional function object.

Function Documentation

MultiFunction cfl::abs ( const MultiFunction 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.
MultiFunction cfl::exp ( const MultiFunction 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.
MultiFunction cfl::log ( const MultiFunction 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.
MultiFunction cfl::max ( const MultiFunction rF,
const MultiFunction rG 
)

Returns the maximum 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 in the maximum.
rGSecond function in the maximum.
Returns
The function given by max(rF,rG) .
MultiFunction cfl::max ( double  dV,
const MultiFunction rF 
)

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

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

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

Parameters
rFThe function-term of the maximum.
dVThe number-term of the maximum.
Returns
The function given by max(rF,dV).
MultiFunction cfl::min ( const MultiFunction rF,
const MultiFunction 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) .
MultiFunction cfl::min ( double  dV,
const MultiFunction rF 
)

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

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

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

Parameters
rFThe function-term of the maximum.
dVThe number-term of the maximum.
Returns
The function given by min(rF,dV) .
MultiFunction cfl::operator* ( const MultiFunction rF,
const MultiFunction 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
MultiFunction cfl::operator* ( double  dV,
const MultiFunction rF 
)

Returns the product of dV and rF. The result contains 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
MultiFunction cfl::operator* ( const MultiFunction rF,
double  dV 
)

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

Parameters
rFThe multiplier function.
dVThe multiplier number.
Returns
The function given by rF*dV.
MultiFunction cfl::operator+ ( const MultiFunction rF,
const MultiFunction 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 function term of the sum.
rGSecond function term of the sum.
Returns
The function given by rF+rG
MultiFunction cfl::operator+ ( double  dV,
const MultiFunction 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
MultiFunction cfl::operator+ ( const MultiFunction rF,
double  dV 
)

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

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

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

Parameters
rFThe function which minus is computed.
Returns
The function given by -rF
MultiFunction cfl::operator- ( const MultiFunction rF,
const MultiFunction 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
MultiFunction cfl::operator- ( double  dV,
const MultiFunction 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
MultiFunction cfl::operator- ( const MultiFunction rF,
double  dV 
)

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

Parameters
rFThe function from which we subtract.
dVThe number which is subtracted.
Returns
The function given by rF-dV.
MultiFunction cfl::operator/ ( const MultiFunction rF,
const MultiFunction 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
MultiFunction cfl::operator/ ( double  dV,
const MultiFunction 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
MultiFunction cfl::operator/ ( const MultiFunction rF,
double  dV 
)

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

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

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

Parameters
rFThe function-base.
dVThe number-exponent.
Returns
The function rF in the power dV.
MultiFunction cfl::sqrt ( const MultiFunction 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.
MultiFunction cfl::toMultiFunction ( double(*)(const std::valarray< double > &)  f,
bool(*)(const std::valarray< double > &)  g,
unsigned  iDim 
)

Returns function with dimension iDim which values are given by f and the domain is defined by g.

Parameters
fThis function determines the values of the result.
gThis function determines the domain of the result.
iDimThe dimension of the result.
Returns
The iDim-dimensional function object which values are given by f and the domain is defined by g.
MultiFunction cfl::toMultiFunction ( const Function rF,
unsigned  iArg,
unsigned  iDim 
)

Adapter of one-dimensional function to a multi-dimensional one.

Parameters
rFThe constant reference to a one-dimensional function object.
iDimThe dimension of the domain of the result.
iArgThe index of the coordinate which is used as an argument of the function rF to compute the value of the result.
Returns
The function with dimension iDim which value at a vector with size iDim equals the value of rF at the element of this vector index iArg.
MultiFunction cfl::toMultiFunction ( const MultiFunction rF,
const std::vector< unsigned > &  rArg,
const std::valarray< double > &  rOtherArg 
)

Constrains multi-dimensional function to a domain of smaller dimension.

Parameters
rFThe input multi-dimensional function.
rArgThe vector of arguments of the flexible coordinates.
rOtherArgThe values of fixed coordinates.
Returns
The restriction of function rF on the points where the coordinates with indexes rArg are flexible and the other coordinates are fixed and equal rOtherArg. The sum of sizes of rArg and rOtherArg should equal the dimension of rF. The dimension of the result equals the the size of rArg.