Package net.algart.math

Examples of net.algart.math.Range.min()


        double[] minCoord = new double[dimCount]; // zero-filled (for further summing)
        double[] maxCoord = new double[dimCount]; // zero-filled (for further summing)
        for (Pattern ptn : allSummands) {
            for (int k = 0; k < dimCount; k++) {
                Range range = ptn.coordRange(k);
                minCoord[k] += range.min();
                maxCoord[k] += range.max();
            }
        }
        for (int k = 0; k < dimCount; k++) {
            this.coordRanges[k] = Range.valueOf(minCoord[k], maxCoord[k]);
View Full Code Here


            Arrays.MinMaxInfo info = new Arrays.MinMaxInfo();
            int numberOfTasks = DefaultThreadPoolFactory.getDefaultThreadPoolFactory().recommendedNumberOfTasks(pa);
            Range range = Arrays.rangeOf(pa, info);
            if (count > 0) {
                for (int k = 0; k < info.indexOfMin(); k++)
                    if (numberOfTasks <= 1 ? pa.getDouble(k) <= range.min()
                        : pa.getDouble(k) < range.min())
                        throw new AssertionError("The bug A in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info
                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMin()) != range.min())
View Full Code Here

            int numberOfTasks = DefaultThreadPoolFactory.getDefaultThreadPoolFactory().recommendedNumberOfTasks(pa);
            Range range = Arrays.rangeOf(pa, info);
            if (count > 0) {
                for (int k = 0; k < info.indexOfMin(); k++)
                    if (numberOfTasks <= 1 ? pa.getDouble(k) <= range.min()
                        : pa.getDouble(k) < range.min())
                        throw new AssertionError("The bug A in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info
                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMin()) != range.min())
                    throw new AssertionError("The bug B in rangeOf found in test #" + testCount + ": "
View Full Code Here

                    if (numberOfTasks <= 1 ? pa.getDouble(k) <= range.min()
                        : pa.getDouble(k) < range.min())
                        throw new AssertionError("The bug A in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info
                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMin()) != range.min())
                    throw new AssertionError("The bug B in rangeOf found in test #" + testCount + ": "
                        + "srcPos = " + srcPos + ", count = " + count + ", " + info);
                for (int k = (int) info.indexOfMin() + 1; k < count; k++)
                    if (pa.getDouble(k) < range.min())
                        throw new AssertionError("The bug C in rangeOf found in test #" + testCount + ": "
View Full Code Here

                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMin()) != range.min())
                    throw new AssertionError("The bug B in rangeOf found in test #" + testCount + ": "
                        + "srcPos = " + srcPos + ", count = " + count + ", " + info);
                for (int k = (int) info.indexOfMin() + 1; k < count; k++)
                    if (pa.getDouble(k) < range.min())
                        throw new AssertionError("The bug C in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info);
                for (int k = 0; k < info.indexOfMax(); k++)
                    if (numberOfTasks <= 1 ? pa.getDouble(k) >= range.max()
                        : pa.getDouble(k) > range.max())
View Full Code Here

            int count = rnd.nextInt(len + 1 - srcPos) / blockSize * blockSize;
            long[] histogram1 = new long[1 + rnd.nextInt(10000)];
            long[] histogram2 = new long[histogram1.length];
            PArray pa = (PArray) a.subArr(srcPos, count);
            Range range = Arrays.rangeOf(pa);
            double from = rnd.nextBoolean() ? range.min() :
                range.min() - range.size() + 3 * rnd.nextDouble() * range.size();
            double to = rnd.nextBoolean() ? range.max() :
                range.min() - range.size() + 3 * rnd.nextDouble() * range.size();
            boolean allInside1 = Arrays.histogramOf(pa, histogram1, from, to);
            boolean allInside2 = true;
View Full Code Here

            long[] histogram1 = new long[1 + rnd.nextInt(10000)];
            long[] histogram2 = new long[histogram1.length];
            PArray pa = (PArray) a.subArr(srcPos, count);
            Range range = Arrays.rangeOf(pa);
            double from = rnd.nextBoolean() ? range.min() :
                range.min() - range.size() + 3 * rnd.nextDouble() * range.size();
            double to = rnd.nextBoolean() ? range.max() :
                range.min() - range.size() + 3 * rnd.nextDouble() * range.size();
            boolean allInside1 = Arrays.histogramOf(pa, histogram1, from, to);
            boolean allInside2 = true;
            double mult = histogram2.length / (to - from);
View Full Code Here

            PArray pa = (PArray) a.subArr(srcPos, count);
            Range range = Arrays.rangeOf(pa);
            double from = rnd.nextBoolean() ? range.min() :
                range.min() - range.size() + 3 * rnd.nextDouble() * range.size();
            double to = rnd.nextBoolean() ? range.max() :
                range.min() - range.size() + 3 * rnd.nextDouble() * range.size();
            boolean allInside1 = Arrays.histogramOf(pa, histogram1, from, to);
            boolean allInside2 = true;
            double mult = histogram2.length / (to - from);
            if (from < to) {
                for (long k = 0; k < count; k++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.