Boost logo

Boost Users :

Subject: Re: [Boost-users] [phoenix][lambda] lambda to phoenix translation: get sig (signature) from actor
From: Eric Niebler (eric_at_[hidden])
Date: 2010-06-05 12:10:38


On 6/5/2010 6:21 AM, alfC wrote:
>>> On May 31, 3:07 am, Joel de Guzman<j..._at_[hidden]> wrote:
>> First, I'll start with a phoenix function taking in a higher order
>> phoenix function: _1+1.
>>
>> boost::function<double(double)> f
>> = divdoub(_1, lambda[_1+1.0]);
>>
>
> Hi Joel DG., Eric N. and Steven W.,
> thank you so much for your help after all these posts I can call my
> little experiment a success,

Great!

<snip>
> let me explain what it does (in can be a nice case study for
> Boost.Phoenix3),
> 1) it takes a phoenix expression [e.g. _1/(_1-3.*si::hertz)], and
> singles out the denominator which has a singularity at 3.*si::hertz
> this qawc function stores the numerator and the singular point, it
> does that by a sort of pattern matching in the function argument:
<snip>

To repeat: in Phoenix 3, this will be easier. Rather that writing your
own custom pattern matching meta-program, you'll be able to use Proto
grammars to find patterns in Phoenix expressions, and you'll use Proto
transforms to modify the expressions however you want.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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