Linear Interpolation Class

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Linear Interpolation Class

sami jamjam
Hello,

I want use the linear interpolation class to interpolate my discount
factors. So I defined the interpolation function as follows :

QuantLib::Handle<Interpolation> interpolations_;

    interpolations_ = Handle<Interpolation>(

                      new LinearInterpolation(xBegin, xEnd, yBegin));

        double discount = (* interpolations_)(today.serialNumber(), true);

But, when I try to test my program with these parameters :

double * xBegin;
double * xEnd;
double * yBegin;

I have an error message, and the execution is stopped. So if there is
somoene who already have an experience with the use of this class can help
me, I will be very grateful.

Regards,

Sami

_________________________________________________________________
Testez le nouveau MSN Messenger ! http://search.msn.fr/



Reply | Threaded
Open this post in threaded view
|

Re: Linear Interpolation Class

Luigi Ballabio
On 07/27/2005 04:31:54 PM, sami jamjam wrote:

> Hello,
>
> I want use the linear interpolation class to interpolate my discount  
> factors. So I defined the interpolation function as follows :
>
> QuantLib::Handle<Interpolation> interpolations_;
>
>    interpolations_ = Handle<Interpolation>(
>
>                      new LinearInterpolation(xBegin, xEnd, yBegin));

Sami,
        what QuantLib version are you using?

Later,
        Luigi

----------------------------------------

There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the
other way is to make it so complicated that there are no obvious
deficiencies.
-- C. A. R. Hoare