Examples of toPoint()


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

            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

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

                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

Examples of net.sf.myway.edit.ui.editors.CoordinateSystem.toPoint()

  public void execute() {
    final CoordinateSystem cs = _target.getCoordinateSystem();
    final MapNode center = _object.getCenter().getNode();
    final Point pos = new Point(newPos);
    if (_relative) {
      final Point point = cs.toPoint(center.getPosition());
      pos.x += point.x;
      pos.y += point.y;
    }
    final Position position = cs.toPosition(pos);
    MapNode n = getBL().findNode(position);
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toPoint()

           
            Coordinate destinationCoord=null;
            Point dest;
            destinationCoord = calculateDestinationPoint(editBlackboard, destinationCoord);
   
            dest=editBlackboard.toPoint(destinationCoord);
            int deltaX = dest.getX() - lastPoint.getX();
            int deltaY = dest.getY()
                    - lastPoint.getY();
            if( deltaX!=0 || deltaY!=0 ){
                editBlackboard.moveSelection(deltaX, deltaY, toMove);
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.toPoint()

        editBlackboard.setGeometries(lake, "lake"); //$NON-NLS-1$
       
        handler.getAcceptBehaviours().add(new AcceptChangesBehaviour(Polygon.class, false));
        Point[] points = new Point[coords.length];
        for( int i = 0; i < coords.length; i++ ) {
            points[i] = editBlackboard.toPoint(coords[i]);
        }
       
        for( int i = 0; i < points.length; i++ ) {
            List<Coordinate> list = editBlackboard.getCoords(points[i].getX(), points[i].getY());
            System.out.println(list.size());
View Full Code Here

Examples of tv.floe.metronome.clustering.kmeans.Mean.toPoint()

   
    Mean averager = new Mean();
    averager.add(zero);
    averager.add(one);
   
    Point averageA = averager.toPoint();
    assertEquals(half, averageA);
   
    averager.reset();
    averager.add(zero);
    averager.add(zero);
View Full Code Here

Examples of tv.floe.metronome.clustering.kmeans.Mean.toPoint()

    averager.add(zero);
    averager.add(zero);
    averager.add(zero);
    averager.add(one);
   
    Point averageB = averager.toPoint();
    assertEquals(quarter, averageB);
  }
 
 
  @Test
View Full Code Here

Examples of tv.floe.metronome.clustering.kmeans.Mean.toPoint()

  }
 
  @Test(expected=IllegalStateException.class)
  public void testToPoint() {
    Mean mean = new Mean();
    mean.toPoint();
  }

}
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.