Package org.jquantlib.math

Examples of org.jquantlib.math.Factorial


    @Override
    public double op(final int k)/* @Read-only */ {
        if (mu==0.0)
            if (k==0) return 1.0;
            else      return 0.0;
        final Factorial fact = new Factorial();
        final double logFactorial = fact.ln(k);
        return Math.exp(k*Math.log(mu) - logFactorial - mu);
    }
View Full Code Here


    //
    // public methods
    //

    private double calcSummand(final int index) {
        final Factorial fact = new Factorial();
        return Math.exp(-lambda) * Math.pow(lambda, index) / fact.get(index);
    }
View Full Code Here

*/
public class MathHelper {

    public static double getFactorial(int n){

    Factorial f = new Factorial();
     /*return*/ f.get(n);
     return n;
    }
View Full Code Here

     /*return*/ f.get(n);
     return n;
    }

     public static double getlNFactorial(int n){
    Factorial f = new Factorial();
     return f.ln(n);
    }
View Full Code Here

    @Override
    public double op(final int k)/* @Read-only */ {
        if (mu==0.0)
            if (k==0) return 1.0;
            else      return 0.0;
        final Factorial fact = new Factorial();
        final double logFactorial = fact.ln(k);
        return Math.exp(k*Math.log(mu) - logFactorial - mu);
    }
View Full Code Here

    //
    // public methods
    //

    private double calcSummand(final int index) {
        final Factorial fact = new Factorial();
        return Math.exp(-lambda) * Math.pow(lambda, index) / fact.get(index);
    }
View Full Code Here

TOP

Related Classes of org.jquantlib.math.Factorial

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.