Examples of distance()


Examples of Hexel.math.Vector3d.distance()

    v.getXYZ(p);

    Resources.vector3dResourcePool.recycle(c);
    Resources.vector3dResourcePool.recycle(p);

    return p.distance(c) > this.engine.chunkVisibilityManager.renderDistance;
  }

  private interface CheckCollidableBlock {
    public boolean isColliding(Block block);
  }
View Full Code Here

Examples of algo.FlightDijkstra.distance()

    alg.execute(dataSet_, from, to, time);

    try {
      queryData_.setPath(alg.reportPath());
      int t = alg.distance(to);
      statusLabel_.setText("Path of length " + ((t - (t%60))/60) + " hours " + (t%60) + " minutes found");
    } catch (InvalidQueryException iqe){
      statusLabel_.setText("No path exists between " + ((AirportSpecs)from.element()).code() +
         " and " + ((AirportSpecs)to.element()).code());
View Full Code Here

Examples of be.ac.ulg.montefiore.run.jahmm.toolbox.KullbackLeiblerDistanceCalculator.distance()

      new KullbackLeiblerDistanceCalculator();
   
    // Incrementally improve the solution
    for (int i = 0; i < 10; i++) {
      System.out.println("Distance at iteration " + i + ": " +
          klc.distance(learntHmm, hmm));
      learntHmm = bwl.iterate(learntHmm, sequences);
    }
   
    System.out.println("Resulting HMM:\n" + learntHmm);
   
View Full Code Here

Examples of chunmap.model.elem.Line.distance()

  @Test
  public void testDistance() {
    // y=x+1;
    Line l = new Line(1, 1);
    CPoint p = new Coordinate2D(0, 0);
    double d = l.distance(p);
    assertTrue(MyDouble.approximateEquals(Math.sqrt(2) / 2d, d));
  }

}
View Full Code Here

Examples of co.ideago.AdvancedPoint.PointND.distance()

    double[] pointData = {10.0, 12.0, 12.0, 14.0};
    double[] singlePointA = {1.0};
    double[] singlePointB = {2.0};
   
    PointND point4Dimensions = new PointND(pointData);
    System.out.println(point4Dimensions.distance(point4Dimensions));
   
    // Test 1D Points:
    PointND point1Da = new PointND(singlePointA);
    PointND point1Db = new PointND(singlePointB);
   
View Full Code Here

Examples of com.ansj.vec.Word2VEC.distance()

public class Test {
    public static void main(String[] args) throws IOException {
        Word2VEC w1 = new Word2VEC() ;
        w1.loadGoogleModel("library/corpus.bin") ;
       
        System.out.println(w1.distance("奥尼尔"));
       
        System.out.println(w1.distance("毛泽东"));
       
        System.out.println(w1.distance("邓小平"));
       
View Full Code Here

Examples of com.ardor3d.math.Vector3.distance()

        if (_picker != null) {
            final Vector3 normalStore = new Vector3();
            final Vector3 intersect = _picker.getTerrainIntersection(getWorldTransform(), _terrainCamera.getLocation(),
                    ray, null, normalStore);
            if (intersect != null) {
                final double distance = intersect.distance(ray.getOrigin());
                final IntersectionRecord record = new IntersectionRecord(new double[] { distance },
                        new Vector3[] { intersect }, new Vector3[] { normalStore }, null);
                return record;
            }
        }
View Full Code Here

Examples of com.datastax.driver.core.policies.LoadBalancingPolicy.distance()

        return this;
    }

    public HostAssert isAtDistance(HostDistance expected) {
        LoadBalancingPolicy loadBalancingPolicy = cluster.manager.loadBalancingPolicy();
        assertThat(loadBalancingPolicy.distance(actual)).isEqualTo(expected);
        return this;
    }

    public HostAssert comesUpWithin(long duration, TimeUnit unit) {
        final CountDownLatch upSignal = new CountDownLatch(1);
View Full Code Here

Examples of com.gameloftProgrammersCup.clientInterfaces.Point.distance()

        }
      }
      Iterator it=waypoints.iterator();
      while (it.hasNext()){
        Point punto=(Point)it.next();
        if (destino==null || punto.distance(unidad.getPosition())<destino.distance(unidad.getPosition())){
          destino=punto;
        }
      }
      unidad.destino=destino;
    }
View Full Code Here

Examples of com.github.davidmoten.rtree.geometry.Rectangle.distance()

    private static final double PRECISION = 0.00001;

    @Test
    public void testDistanceToSelfIsZero() {
        Rectangle r = rectangle(0, 0, 1, 1);
        assertEquals(0, r.distance(r), PRECISION);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testXParametersWrongOrderThrowsException() {
        rectangle(2, 0, 1, 1);
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.