|
Boost Users : |
Subject: Re: [Boost-users] [phoenix][lambda] lambda to phoenix translation: get sig (signature) from actor
From: alfC (alfredo.correa_at_[hidden])
Date: 2010-05-31 15:32:22
> > bind(
> > &result_type::value,
> > actor<LambdaExp>(at_c<0>(f_expr))( // Question: what goes here? to
> > apply the subexpr.
> > bind(
> > &quantity<UnitIntegrandDomain>::from_value,
> > arg_names::arg1
> > )
> > ) // end here
> > );
>
> What are the args to LambdaExp?
f_expr can be any phoenix expression taking one argument the
integration variable, and returning a quantity.
the object of LambdaExp type can be any phoenix subexpression of
f_expr, typically should represent another function that takes one
argument the integration variable (e.g. quantity) and returns another
quantity
to give you an example:
if f_expr was "(boost::phoenix::arg_names::_1 * 0.2 )/
(boost::phoenix::arg_names::_1-wp)" (wp is a constant)
the type of LambdaExp is
composite<multiplies_eval, vector<argument<0>, value<double> >
if f_expr was "(boost::phoenix::arg_names::_1)/
(boost::phoenix::arg_names::_1-wp)"
then the type LambdaExp is
argument<0>
fi f_expr was "wp/(boost::phoenix::arg_names::_1-wp)"
then the type LambdaExp is
value<boost::units::quantity<...> >
note that LambdaExp is the numerator in the fraction.
the question is how to apply whatever is represented by
at_c<0>(f_expr) to another phoenix expression.
Thank you,
Alfredo
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net