Package org.jquantlib.math.functions

Examples of org.jquantlib.math.functions.ComposedFunction


        /*@Size*/ final int N = samples();
        QL.require(N > 1, "sample number <=1, unsufficient");
        // Subtract the mean and square. Repeat on the whole range.
        // Hopefully, the whole thing will be inlined in a single loop.
        /*@Real*/ final double s2 = expectationValue(
            new ComposedFunction(
                new Square(), new Bind2nd(
                    new Minus(), mean())),
                                   new Everywhere()).first();
        return s2*N/(N-1.0);
    }
View Full Code Here


    public /*@Real*/ double skewness() /*@ReadOnly*/ {
        /*@Size*/ final int N = samples();
        QL.require(N > 2, "sample number <=2, unsufficient");

        /*@Real*/ final double x = expectationValue(
            new ComposedFunction(
                new Cube(), new Bind2nd(
                    new Minus(), mean())),
                                  new Everywhere()).first();
        /*@Real*/ final double sigma = standardDeviation();

View Full Code Here

    public /*@Real*/ double kurtosis() /*@ReadOnly*/ {
        /*@Size*/ final int N = samples();
        QL.require(N > 3, "sample number <=3, unsufficient");

        /*@Real*/ final double x = expectationValue(
            new ComposedFunction(
                new Fourth(), new Bind2nd(
                    new Minus(), mean())),
                                  new Everywhere()).first();
        /*@Real*/ final double sigma2 = variance();

View Full Code Here

TOP

Related Classes of org.jquantlib.math.functions.ComposedFunction

Copyright © 2018 www.massapicom. 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.