Package org.jquantlib.math.interpolations

Examples of org.jquantlib.math.interpolations.CubicInterpolation.op()


                  +"\n interpolated value: "+interpolated
                  +"\n expected value:     "+generic_natural_y2.get(i)
                  +"\n error:              "+error,
                  abs(error) > 3e-16);
        }
        x35[1] = f.op(3.5);


        // Clamped spline
        final double y1a = 0.0;
        final double y1b = 0.0;
View Full Code Here


        f.update();

        checkValues("Clamped spline", f, generic_x, generic_y);
        check1stDerivativeValue("Clamped spline", f, generic_x.first(), 0.0);
        check1stDerivativeValue("Clamped spline", f, generic_x.last()0.0);
        x35[0] = f.op(3.5);


        // Not-a-knot spline
        f = new CubicInterpolation(
                generic_x, generic_y,
View Full Code Here

                CubicInterpolation.BoundaryCondition.NotAKnot, Constants.NULL_REAL);
        f.update();

        checkValues("Not-a-knot spline", f, generic_x, generic_y);
        checkNotAKnotCondition("Not-a-knot spline", f);
        x35[2] = f.op(3.5);

        assertFalse("Spline interpolation failure"
            +"\n at x = "+3.5
            +"\n clamped spline    "+x35[0]
            +"\n natural spline    "+x35[1]
View Full Code Here

      check2ndDerivativeValue("Natural spline", f, RPN15A_x.first(), 0.0);
      check2ndDerivativeValue("Natural spline", f, RPN15A_x.last()0.0);

      // poor performance
      final double x_bad = 11.0;
      interpolated = f.op(x_bad);
        assertFalse("Natural spline interpolation poor performance unverified"
                +"\n    at x = "+x_bad
                +"\n    interpolated value: "+interpolated
                +"\n    expected value > 1.0",
                interpolated<1.0);
View Full Code Here

      checkValues("Clamped spline", f, RPN15A_x, RPN15A_y);
      check1stDerivativeValue("Clamped spline", f, RPN15A_x.first(), 0.0);
      check1stDerivativeValue("Clamped spline", f, RPN15A_x.last()0.0);

      // poor performance
      interpolated = f.op(x_bad);
        assertFalse("Clamped spline interpolation poor performance unverified"
                +"\n    at x = "+x_bad
                +"\n    interpolated value: "+interpolated
                +"\n    expected value > 1.0",
                interpolated<1.0);
View Full Code Here

      checkValues("Not-a-knot spline", f, RPN15A_x, RPN15A_y);
      checkNotAKnotCondition("Not-a-knot spline", f);

      // poor performance
      interpolated = f.op(x_bad);
        assertFalse("Not-a-knot spline interpolation poor performance unverified"
                +"\n    at x = "+x_bad
                +"\n    interpolated value: "+interpolated
                +"\n    expected value > 1.0",
                interpolated<1.0);
View Full Code Here

      f.update();

      checkValues("MC natural spline", f, RPN15A_x, RPN15A_y);

      // good performance
      interpolated = f.op(x_bad);
        assertFalse("MC natural spline interpolation good performance unverified"
                +"\n    at x = "+x_bad
                +"\n    interpolated value: "+interpolated
                +"\n    expected value > 1.0",
                interpolated>1.0);
View Full Code Here

      checkValues("MC clamped spline", f, RPN15A_x, RPN15A_y);
      check1stDerivativeValue("MC clamped spline", f, RPN15A_x.first(), 0.0);
      check1stDerivativeValue("MC clamped spline", f, RPN15A_x.last()0.0);

      // good performance
      interpolated = f.op(x_bad);
        assertFalse("MC clamped spline interpolation good performance unverified"
                +"\n    at x = "+x_bad
                +"\n    interpolated value: "+interpolated
                +"\n    expected value > 1.0",
                interpolated>1.0);
View Full Code Here

      f.update();

      checkValues("MC not-a-knot spline", f, RPN15A_x, RPN15A_y);

      // good performance
      interpolated = f.op(x_bad);
        assertFalse("MC clamped spline interpolation good performance unverified"
                +"\n    at x = "+x_bad
                +"\n    interpolated value: "+interpolated
                +"\n    expected value > 1.0",
                interpolated>1.0);
View Full Code Here

                    CubicInterpolation.BoundaryCondition.NotAKnot, 0.0);

            checkValues("Not-a-knot spline", f, x, y);
            checkNotAKnotCondition("Not-a-knot spline", f);
            // bad performance
            interpolated  = f.op(x1_bad);
            interpolated2 = f.op(x2_bad);
            assertFalse("Not-a-knot spline interpolation bad performance unverified"
                    +"\n    at x = "+x1_bad
                    +"\n    interpolated value: "+interpolated
                    +"\n    at x = "+x2_bad
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.