Package com.barrybecker4.common.math

Examples of com.barrybecker4.common.math.ComplexNumber


     * @return the cut points
     */
    public double[] getCutPoints(Range range, int maxNumTicks) {

        validateArguments(range);
        Range finalRange = new Range(range);
        if (range.getExtent() <= MIN_RANGE) {
            finalRange.add(range.getMin() + MIN_RANGE);
        }

        List<Double> positions = new ArrayList<Double>(10);

        if (finalRange.getExtent() < MIN_RANGE) {
            positions.add(finalRange.getMin());
        } else {
            determineCutPoints(maxNumTicks, finalRange, positions);
        }

        double[] result = new double[positions.size()];
View Full Code Here


    void determineCutPoints(int maxTicks, Range finalRange, List<Double> positions) {

        double extent = Rounder.round(finalRange.getExtent(), false);
        double d = Rounder.round(extent / (maxTicks - 1), true);
        Range roundedRange =
                new Range(Math.floor(finalRange.getMin() / d) * d, Math.ceil(finalRange.getMax() / d) * d);

        addPoints(positions, roundedRange, finalRange, d);
    }
View Full Code Here

     * Constructor.
     * @param func the array representing function values.
     * @param interpMethod method to use when interpolating
     */
    private ArrayFunction(double[] func, InterpolationMethod interpMethod) {
        this(func, new FunctionInverter(func).createInverseFunction(new Range(0, 1.0)), interpMethod);
    }
View Full Code Here

        return interpolator.interpolate(value);
    }

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

        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

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

TOP

Related Classes of com.barrybecker4.common.math.ComplexNumber

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.