ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
Functions
anonymous_namespace{named_func.cpp} Namespace Reference

Functions

template<typename Operator >
function< ScalarFuncApplyOp (const function< ScalarFunc > &f, const Operator &op)
 Get a functor applying unary operator op to f. More...
 
template<typename Operator >
function< VectorFuncApplyOp (const function< VectorFunc > &f, const Operator &op)
 Get a functor applying unary operator op to f. More...
 
template<typename Operator >
pair< function< ScalarFunc >, function< VectorFunc > > ApplyOp (const function< ScalarFunc > &sfa, const function< VectorFunc > &vfa, const function< ScalarFunc > &sfb, const function< VectorFunc > &vfb, const Operator &op)
 Get a functor applying binary operator op to operands (sfa or vfa) and (sfb or vfb) More...
 
template<>
pair< function< ScalarFunc >, function< VectorFunc > > ApplyOp (const function< ScalarFunc > &sfa, const function< VectorFunc > &vfa, const function< ScalarFunc > &sfb, const function< VectorFunc > &vfb, const logical_and< ScalarType > &)
 Get a functor applying binary "&&" to operands (sfa or vfa) and (sfb or vfb) More...
 
template<>
pair< function< ScalarFunc >, function< VectorFunc > > ApplyOp (const function< ScalarFunc > &sfa, const function< VectorFunc > &vfa, const function< ScalarFunc > &sfb, const function< VectorFunc > &vfb, const logical_or< ScalarType > &)
 Get a functor applying binary "||" to operands (sfa or vfa) and (sfb or vfb) More...
 

Function Documentation

template<typename Operator >
function<ScalarFunc> anonymous_namespace{named_func.cpp}::ApplyOp ( const function< ScalarFunc > &  f,
const Operator &  op 
)

Get a functor applying unary operator op to f.

Parameters
[in]fFunction which takes a Baby and returns a single value
[in]opUnary operator to apply to f
Returns
Functor which takes a Baby and returns the result of applying op to the result of f

Definition at line 70 of file named_func.cpp.

template<typename Operator >
function<VectorFunc> anonymous_namespace{named_func.cpp}::ApplyOp ( const function< VectorFunc > &  f,
const Operator &  op 
)

Get a functor applying unary operator op to f.

Parameters
[in]fFunction which takes a Baby and returns a vector of values
[in]opUnary operator to apply to f
Returns
Functor which takes a Baby and returns the result of applying op to each element of the result of f

Definition at line 89 of file named_func.cpp.

template<typename Operator >
pair<function<ScalarFunc>, function<VectorFunc> > anonymous_namespace{named_func.cpp}::ApplyOp ( const function< ScalarFunc > &  sfa,
const function< VectorFunc > &  vfa,
const function< ScalarFunc > &  sfb,
const function< VectorFunc > &  vfb,
const Operator &  op 
)

Get a functor applying binary operator op to operands (sfa or vfa) and (sfb or vfb)

sfa and vfa are associated to the same NamedFunc, and sfb and vfb are associated to the same NamedFunc. Exactly one from each pair should be a valid function. Determines the valid function from each pair and applies binary operator op between the "a" function result on the left and the "b" function result on the right.

Parameters
[in]sfaScalar function from the same NamedFunc as vfa
[in]vfaVector function from the same NamedFunc as sfa
[in]sfbScalar function from the same NamedFunc as vfb
[in]vfbVector function from the same NamedFunc as sfb
[in]opUnary operator to apply to (sfa or vfa) and (sfb or vfb)
Returns
Functor which takes a Baby and returns the result of applying op to (sfa or vfa) and (sfb or vfb)

Definition at line 125 of file named_func.cpp.

template<>
pair<function<ScalarFunc>, function<VectorFunc> > anonymous_namespace{named_func.cpp}::ApplyOp ( const function< ScalarFunc > &  sfa,
const function< VectorFunc > &  vfa,
const function< ScalarFunc > &  sfb,
const function< VectorFunc > &  vfb,
const logical_and< ScalarType > &   
)

Get a functor applying binary "&&" to operands (sfa or vfa) and (sfb or vfb)

Replaces generic template with short-circuiting "and" logic.

See also
ApplyOp().
Parameters
[in]sfaScalar function from the same NamedFunc as vfa
[in]vfaVector function from the same NamedFunc as sfa
[in]sfbScalar function from the same NamedFunc as vfb
[in]vfbVector function from the same NamedFunc as sfb
Returns
Functor which takes a Baby and returns the result of applying op to (sfa or vfa) and (sfb or vfb)

Definition at line 188 of file named_func.cpp.

template<>
pair<function<ScalarFunc>, function<VectorFunc> > anonymous_namespace{named_func.cpp}::ApplyOp ( const function< ScalarFunc > &  sfa,
const function< VectorFunc > &  vfa,
const function< ScalarFunc > &  sfb,
const function< VectorFunc > &  vfb,
const logical_or< ScalarType > &   
)

Get a functor applying binary "||" to operands (sfa or vfa) and (sfb or vfb)

Replaces generic template with short-circuiting "or" logic.

See also
ApplyOp().
Parameters
[in]sfaScalar function from the same NamedFunc as vfa
[in]vfaVector function from the same NamedFunc as sfa
[in]sfbScalar function from the same NamedFunc as vfb
[in]vfbVector function from the same NamedFunc as sfb
Returns
Functor which takes a Baby and returns the result of applying op to (sfa or vfa) and (sfb or vfb)

Definition at line 254 of file named_func.cpp.

Referenced by operator!(), operator!=(), NamedFunc::operator%=(), operator&&(), NamedFunc::operator*=(), NamedFunc::operator+=(), operator-(), NamedFunc::operator-=(), NamedFunc::operator/=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), and operator||().