in

.NET Opensource

Community for opensource projects by Christoph Rüegg

Extrapolation IndexOutOfRangeException

Last post 04-02-2008 20:29 by Christoph Rüegg. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-02-2008 10:20

    • phili
    • Top 25 Contributor
    • Joined on 03-13-2008
    • Posts 5

    Extrapolation IndexOutOfRangeException

    Hi,

     

    I get an Error if I extropolate in positive direction:

     

    double[ x = new double[ { -6.060771484, -5.855378418, -1.794238281, -1.229428711, 0.89935791, 2.912121582, 4.699230957, 4.788347168, 7.728830566, 11.70989502 };
                double[ y = new double[ { 0.959422052, 0.959447861, 0.959958017, 0.960028946, 0.960323274, 0.960636258, 0.960914195, 0.960928023, 0.96138531, 0.962004483 };

                PolynomialInterpolationAlgorithm pia = new PolynomialInterpolationAlgorithm(10);
                SampleList sl = new SampleList(10);

                for(int i=0;i<10;i++)
                {
                    sl.Add(x[i],y[i]);
                }
               
                pia.Prepare(sl);

                Console.WriteLine(pia.Extrapolate(12).ToString());
                Console.ReadLine();

     

     

    it works for  pia.Extrapolate(-10);  (negativ direction)

     

    regards philipp; 

  • 04-02-2008 20:29 In reply to

    Re: Extrapolation IndexOutOfRangeException

    Answer

    This is a bug, thanks for reporting. It is tracked as IRID-119.

    I was able to repro it, and fixed it in revision 410.

Page 1 of 1 (2 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems