Package net.algart.math

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


        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]);
            checkCoordRange(this.coordRanges[k]);
View Full Code Here


                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())
                        throw new AssertionError("The bug D in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info
                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMax()) != range.max())
View Full Code Here

                    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())
                        throw new AssertionError("The bug D in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info
                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMax()) != range.max())
                    throw new AssertionError("The bug E in rangeOf found in test #" + testCount + ": "
View Full Code Here

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

                            + ", pa.getDouble(" + k + ") = " + pa.getDouble(k));
                if (pa.getDouble(info.indexOfMax()) != range.max())
                    throw new AssertionError("The bug E in rangeOf found in test #" + testCount + ": "
                        + "srcPos = " + srcPos + ", count = " + count + ", " + info);
                for (int k = (int) info.indexOfMax() + 1; k < count; k++)
                    if (pa.getDouble(k) > range.max())
                        throw new AssertionError("The bug F in rangeOf found in test #" + testCount + ": "
                            + "srcPos = " + srcPos + ", count = " + count + ", " + info);
            }
            showProgress(testCount, numberOfTests);
        }
View Full Code Here

            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);
            if (from < to) {
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.