Package net.algart.math

Examples of net.algart.math.IPoint.toPoint()


            FramePosition p = singleFrame.position();
            if (integerShiftPositions) {
//                System.out.println("1 frame branch: integer coordinates");
                Point o = p.area().min();
                IPoint localOffset = o.toRoundedPoint();
                assert o.equals(localOffset.toPoint());
                Matrix<T> casted = Matrices.asFuncMatrix(Func.IDENTITY, requiredType, m);
                // - must be before subMatr, if requiredType allows outsideValue, but the source matrix does not
                return casted.subMatr(localOffset.symmetric().coordinates(), dimensions,
                    Matrix.ContinuationMode.getConstantMode(outsideValue(actualFrames)));
            }
View Full Code Here


            List<Matrix<? extends PArray>> expandedMatrices =
                new ArrayList<Matrix<? extends PArray>>(actualFrames.size());
            for (Frame<P> localFrame : actualFrames) {
                Point o = localFrame.position().area().min();
                IPoint localOffset = o.toRoundedPoint();
                assert o.equals(localOffset.toPoint());
                Matrix<? extends PArray> m = localFrame.matrix();
                m = Matrices.asFuncMatrix(Func.IDENTITY, DoubleArray.class, m);
                // - we need Double virtual matrix to provide correct NaN values to the combining function
                m = m.subMatr(localOffset.symmetric().coordinates(), dimensions, Matrix.ContinuationMode.NAN_CONSTANT);
                expandedMatrices.add(m);
View Full Code Here

                if (pair.shifts.pointCount() == 1) {
                    // so, there is no sense to store the shift and the basic pattern separately
                    IPoint shift = pair.shifts.roundedPoints().iterator().next();
                    if (!shift.isOrigin()) {
                        pair = new MinkowskiPair(
                            pair.main.shift(shift.toPoint()),
                            Collections.singleton(IPoint.origin(shift.coordCount())),
                            null);
                    }
                }
            }
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.