Package org.jquantlib.math.matrixutilities

Examples of org.jquantlib.math.matrixutilities.Array.last()


        // Natural spline
        CubicInterpolation f = new CubicInterpolation(
                generic_x, generic_y,
                CubicInterpolation.DerivativeApprox.Spline, false,
                CubicInterpolation.BoundaryCondition.SecondDerivative, generic_natural_y2.first(),
                CubicInterpolation.BoundaryCondition.SecondDerivative, generic_natural_y2.last());
        f.update();

        checkValues("Natural spline", f, generic_x, generic_y);
        // cached second derivative
        for (int i=0; i<n; i++) {
View Full Code Here


        // Natural spline
        CubicInterpolation f = new CubicInterpolation(
                generic_x, generic_y,
                CubicInterpolation.DerivativeApprox.Spline, false,
                CubicInterpolation.BoundaryCondition.SecondDerivative, generic_natural_y2.first(),
                CubicInterpolation.BoundaryCondition.SecondDerivative, generic_natural_y2.last());
        f.update();

        checkValues("Natural spline", f, generic_x, generic_y);
        // cached second derivative
        for (int i=0; i<n; i++) {
View Full Code Here

        for(int i = 0; i < f2.size(); i++)
            I += f2.get(i);

        //not sure about this...
        I -= 0.5 * f2.first();
        I -= 0.5 * f2.last();
        I *= h;

        return Math.sqrt(I);
    }

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.