Package com.barrybecker4.common.math.function

Examples of com.barrybecker4.common.math.function.LinearFunction


        return sign * inverseInterpolator.interpolate(Math.abs(x));
    }

    @Override
    public Range getDomain() {
        return new Range(-5.0, 5.0);
    }
View Full Code Here


    }

    /** X axis domain */
    @Override
    public Range getDomain() {
        return new Range(xValues.get(0), xValues.get(xValues.size()-1));
    }
View Full Code Here

        return getInterpolatedValue(value);
    }

    @Override
    public Range getDomain() {
        return new Range(xValues[0], xValues[xValues.length-1]);
    }
View Full Code Here

        return Math.pow(base, value / scale);
    }

    @Override
    public Range getDomain() {
        return new Range(0, Double.MAX_VALUE);
    }
View Full Code Here

        return (value - offset) / scale;
    }

    @Override
    public Range getDomain() {
        return new Range(Double.MIN_VALUE, Double.MAX_VALUE);
    }
View Full Code Here

        double max = opts_.getTheoreticalMaximum();
        double xScale = Math.pow(10, Math.max(0, Math.log10(max) - opts_.xResolution));
        double xLogScale = 3 * opts_.xResolution * opts_.xResolution;

        InvertibleFunction xFunction =
                opts_.useLogScale ? new LogFunction(xLogScale, 10.0, true) : new LinearFunction(1/xScale);

        int maxX = (int)xFunction.getValue(max);
        data_ = new int[maxX + 1];

        histogram_ = new HistogramRenderer(data_, xFunction);
View Full Code Here

    }

    @Override
    protected void initHistogram() {
        data_ = new int[numDice_ * (numSides_-1) + 1];
        histogram_ = new HistogramRenderer(data_, new LinearFunction(1.0, -numDice_));
        histogram_.setXFormatter(new IntegerFormatter());
    }
View Full Code Here

    /**
     * Constructor that assumes no scaling ont he x axis.
     * @param data  the array to hold counts for each x axis position.
     */
    public HistogramRenderer(int[] data) {
        this(data, new LinearFunction(1.0));
    }
View Full Code Here

    /**
     * Constructor.
     */
    public ErrorFunction() {
        interpolator = new LinearInterpolator(ERROR_FUNCTION);
        inverseInterpolator = new LinearInterpolator(INVERSE_ERROR_FUNCTION);
    }
View Full Code Here

     */
    protected boolean processToken(SGFToken token, MoveList moveList) {

        boolean found = false;
        if (token instanceof PlacementToken ) {
            Move move = createMoveFromToken( token );
            GameContext.log(2, "creating move="+ move);
            moveList.add( move );
            found = true;
        } else {
            GameContext.log(0, "ignoring token "+token.getClass().getName());
View Full Code Here

TOP

Related Classes of com.barrybecker4.common.math.function.LinearFunction

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.