Example usage for org.apache.commons.math.distribution ContinuousDistribution ContinuousDistribution

List of usage examples for org.apache.commons.math.distribution ContinuousDistribution ContinuousDistribution

Introduction

In this page you can find the example usage for org.apache.commons.math.distribution ContinuousDistribution ContinuousDistribution.

Prototype

ContinuousDistribution

Source Link

Usage

From source file:feast.expressions.ExpCalculatorParametricDistribution.java

@Override
public Distribution getDistribution() {

    return new ContinuousDistribution() {

        @Override/*from  w w  w  . ja v  a  2s  .com*/
        public double inverseCumulativeProbability(double p) throws MathException {
            throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        }

        @Override
        public double density(double x) {
            if (isLogInput.get())
                return Math.exp(getExpressionValue(x));
            else
                return getExpressionValue(x);
        }

        @Override
        public double logDensity(double x) {
            if (isLogInput.get())
                return getExpressionValue(x);
            else
                return Math.log(getExpressionValue(x));
        }

        @Override
        public double cumulativeProbability(double x) throws MathException {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public double cumulativeProbability(double x0, double x1) throws MathException {
            throw new UnsupportedOperationException("Not supported yet.");
        }
    };

}