Package net.algart.math

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


                // but it is practically useless; this check allows to avoid overflow while integer summarizing.
                for (int k = 1, n = pattern.dimCount(); k < n; k++) {
                    // Starting from k=1: no sense to specially optimize summarizing along x-axis
                    IRange range = pattern.roundedCoordRange(k);
                    if (range.size() == pointCount) {
                        processAlongAxis(dest.array(), src.array(), src.dimensions(), k, range.min(), range.max());
                        return;
                    }
                }
            }
        }
View Full Code Here


        initializeProgress(destRegion);
        boolean fullyInside = true;
        for (int k = 0, n = destRegion.n(); k < n; k++) {
            IRange destRange = destRegion.coordRange(k);
            long destMin = destRange.min();
            long destMax = destRange.max();
            if (destMin < 0 || destMax >= dest.dim(k)) {
                fullyInside = false;
                break;
            }
            long srcMin = shifts.length > k ? destMin - shifts[k] : destMin;
View Full Code Here

        if (n == 1) {
            segmentCopier.copySegment(destRegion);
        } else { // the recursion
            final IRange destRange = destRegion.coordRange(n - 1);
            final long destMin = destRange.min();
            final long destMax = destRange.max();
            Matrices.Region.MutableIRange mutableCoordRange = new Matrices.Region.MutableIRange();
            for (long k = destMin; k <= destMax; k++) {
                destCoordinates[n - 1] = k;
                srcCoordinates[n - 1] = shifts.length >= n ? k - shifts[n - 1] : k;
                if (destRegion.sectionIsUninterruptedSegment(k)) {
View Full Code Here

        abstract void copyInterruptedSegment(Matrices.Region destRegion, long destMin, long destMax);

        final void copySegment(Matrices.Region destRegion) {
            final IRange destRange = destRegion.coordRange(0);
            if (destRegion.isRectangular()) {
                copyUninterruptedSegment(destRange.min(), destRange.max());
            } else {
                // rare situation: only non-standard implementations of Matrices.Region
                copyInterruptedSegment(destRegion, destRange.min(), destRange.max());
            }
            updateProgressForSegment(destRange);
View Full Code Here

            final IRange destRange = destRegion.coordRange(0);
            if (destRegion.isRectangular()) {
                copyUninterruptedSegment(destRange.min(), destRange.max());
            } else {
                // rare situation: only non-standard implementations of Matrices.Region
                copyInterruptedSegment(destRegion, destRange.min(), destRange.max());
            }
            updateProgressForSegment(destRange);
        }

        final void copyRange(long destIndex, long srcIndex, long len) {
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.