Examples of distance()


Examples of com.vividsolutions.jts.operation.distance.DistanceOp.distance()

      Geometry B = wktRdr.read(wktB);
      System.out.println("Geometry A: " + A);
      System.out.println("Geometry B: " + B);
      DistanceOp distOp = new DistanceOp(A, B);

      double distance = distOp.distance();
      System.out.println("Distance = " + distance);

      Coordinate[] closestPt = distOp.nearestPoints();
      LineString closestPtLine = fact.createLineString(closestPt);
      System.out.println("Closest points: " + closestPtLine
View Full Code Here

Examples of crazypants.vecmath.Vector3d.distance()

    double mix = MathHelper.clamp_float((start - ratio) / (start - end), 0, 1);
    double scale = 1;
    if(mix > 0) {
     
      Vector3d eyePoint = Util.getEyePositionEio(EnderIO.proxy.getClientPlayer());     
      scale = tanFovRad * eyePoint.distance(loc);
     
      //Using this scale will give us the block full screen, we will make it 20% of the screen
      scale *= Config.travelAnchorZoomScale;     

      //only apply 70% of the scaling so more distance targets are still smaller than closer targets
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.distance.distancefunction.WeightedDistanceFunction.distance()

      double d1 = m1.norm2();

      WeightedDistanceFunction df1 = new WeightedDistanceFunction(pca1.similarityMatrix());
      WeightedDistanceFunction df2 = new WeightedDistanceFunction(pca2.similarityMatrix());

      double affineDistance = Math.max(df1.distance(o1, o2).doubleValue(), df2.distance(o1, o2).doubleValue());

      return new SubspaceDistance(d1, affineDistance);
    }
  }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.distance.distancefunction.correlation.ERiCDistanceFunction.distance()

              if(logger.isDebugging()) {
                msg.append("\n").append(parent).append(" is parent of ").append(child);
              }
            }
            else {
              BitDistance dist = distanceFunction.distance(parent.getModel().getCentroid(), child.getModel().getCentroid(), parent.getModel().getPCAResult(), child.getModel().getPCAResult());
              if(!dist.bitValue() && (child.getParents().isEmpty() || !isParent(distanceFunction, parent, child.getParents()))) {
                parent.getChildren().add(child);
                child.getParents().add(parent);
                if(logger.isDebugging()) {
                  msg.append("\n").append(parent).append(" is parent of ").append(child);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.DimensionsSelectingEuclideanDistanceFunction.distance()

     * @param weightVector
     * @return sod value
     */
    private double subspaceOutlierDegree(O queryObject, O center, BitSet weightVector) {
      final DimensionsSelectingEuclideanDistanceFunction df = new DimensionsSelectingEuclideanDistanceFunction(weightVector);
      double distance = df.distance(queryObject, center).doubleValue();
      distance /= weightVector.cardinality();
      return distance;
    }

    /**
 
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.SubspaceEuclideanDistanceFunction.distance()

      final SubspaceEuclideanDistanceFunction df = new SubspaceEuclideanDistanceFunction(weightVector);
      final int card = weightVector.cardinality();
      if(card == 0) {
        return 0;
      }
      double distance = df.distance(queryObject, center).doubleValue();
      distance /= card;
      return distance;
    }

    /**
 
View Full Code Here

Examples of eas.math.geometry.Vector2D.distance()

        double fges = 0;

        for (int i = 0; i < agentlist.size(); i++) {
            Vector2D pos = new Vector2D(agentlist.get(i).getPosition().getX(),
                    agentlist.get(i).getPosition().getY());
            if (pos.distance(this.getAgentPosition(agentID)) <= PanicAgent.radius * 2) {
                fges += agentlist.get(i).getForce().length();
            }
        }

        return fges;
View Full Code Here

Examples of eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine.net.phys2d.math.Vector2f.distance()

    if (rightPoint != null) {
      dis1 = rightPoint.distance(start) - norm.length();
    }
    float dis2 = Float.MAX_VALUE;
    if (leftPoint != null) {
      dis2 = leftPoint.distance(start) - norm.length();
    }
   
    norm.normalise();
    float dis = Math.min(dis1,dis2);
   
View Full Code Here

Examples of java.awt.Point.distance()

        }

        scalePoint(beforeP, beforeC);
        scalePoint(afterP, afterC);

        if (afterP.distance(beforeP) < this.threshold) {
            // TODO: lowpass
        } else {
            // TODO: highpass
        }
        throw new NotImplementedException();
View Full Code Here

Examples of java.awt.Point.distance()

        // Here we check if a new point is inside or outside the current area of the fixation list
        // If it is inside (code far down below), we will simply add the new point, this is the "good"
        // case. If the point is outside a given radius, we need some logic to decide what to do.
        // Basically this can be caused by two things: A random outlier (measurement failure), or a
        // systematic gaze to another position.
        if (center.distance(filteredEvent.getGazeCenter()) > this.radiusFixationTime) {

            // In any case, increase the number of outliers and add the new "bad point"
            this.numConsecutiveOutliers++;
            this.outliers.add(filteredEvent);
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.