Examples of toPoint()


Examples of graphmatcher.graph.Vertex.toPoint()

    Vertex vertex = graph.vertices()[vertexId];
    _graph = graph;

    _center = graph.getCenter();
    _maxDistance = graph.getMaximumVertexDistanceToCenter() * 2;
    double distToCenter = DistanceHelper.getDistance(_center, vertex.toPoint());
    _relativDist = distToCenter / _maxDistance;

    _unconnectedVerticesBins = new Vector[_numberOfAngleBins][_numberOfRadiusBins];
    _connectedVerticesBins = new Vector[_numberOfAngleBins][_numberOfRadiusBins];
    _visibleVerticesBins = new Vector[_numberOfAngleBins][_numberOfRadiusBins];
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

  public static double getDistanceToCenter(Edge edge, Graph graph) {
    double distance = 0;
    Vertex vertex1 = graph.vertices()[edge.vertex1];
    Vertex vertex2 = graph.vertices()[edge.vertex2];
    distance += getDistance(vertex1.toPoint(), graph.getCenter());
    distance += getDistance(vertex2.toPoint(), graph.getCenter());
    return distance / 2;
  }
}
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

      double anglePV1, anglePV2, angleTV1, angleTV2;
      if (match1on1) {
        anglePV1 = AngleHelper.getAngle(pCenter, pHelp, pVertex1.toPoint());
        anglePV2 = AngleHelper.getAngle(pCenter, pHelp, pVertex2.toPoint());
        angleTV1 = AngleHelper.getAngle(tCenter, tHelp, tVertex1.toPoint());
        angleTV2 = AngleHelper.getAngle(tCenter, tHelp, tVertex2.toPoint());
      } else {
        anglePV1 = AngleHelper.getAngle(pCenter, pHelp, pVertex1.toPoint());
        anglePV2 = AngleHelper.getAngle(pCenter, pHelp, pVertex2.toPoint());
        angleTV1 = AngleHelper.getAngle(tCenter, tHelp, tVertex2.toPoint());
        angleTV2 = AngleHelper.getAngle(tCenter, tHelp, tVertex1.toPoint());
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

        angleTV1 = AngleHelper.getAngle(tCenter, tHelp, tVertex1.toPoint());
        angleTV2 = AngleHelper.getAngle(tCenter, tHelp, tVertex2.toPoint());
      } else {
        anglePV1 = AngleHelper.getAngle(pCenter, pHelp, pVertex1.toPoint());
        anglePV2 = AngleHelper.getAngle(pCenter, pHelp, pVertex2.toPoint());
        angleTV1 = AngleHelper.getAngle(tCenter, tHelp, tVertex2.toPoint());
        angleTV2 = AngleHelper.getAngle(tCenter, tHelp, tVertex1.toPoint());
      }
      double rating = rateAngle(anglePV1, angleTV1) + rateAngle(anglePV2, angleTV2);
      rating = rating / 2;
      // 0,95
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

    // Abst�nde zum Mittelpunkt
    double pV1Dist = DistanceHelper.getDistance(pVertex1.toPoint(), pattern.getCenter());
    double pV2Dist = DistanceHelper.getDistance(pVertex2.toPoint(), pattern.getCenter());
    double tV1Dist = DistanceHelper.getDistance(tVertex1.toPoint(), template.getCenter());
    double tV2Dist = DistanceHelper.getDistance(tVertex2.toPoint(), template.getCenter());

    double bestDistToCenterRatio;
    if (match1on1) {
      bestDistToCenterRatio = (rate(pV1Dist, pMaxDistanceToCenter, tV1Dist, tMaxDistanceToCenter) + rate(
          pV2Dist, pMaxDistanceToCenter, tV2Dist, tMaxDistanceToCenter)) / 2;
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

    // Winkel
    double pAngle, tAngle;
    if (match1on1) {
      pAngle = AngleHelper.getAngle(pVertex1.toPoint(), pattern.getCenter(), pVertex2.toPoint());
      tAngle = AngleHelper.getAngle(tVertex1.toPoint(), template.getCenter(), tVertex2.toPoint());
    } else {
      pAngle = AngleHelper.getAngle(pVertex1.toPoint(), pattern.getCenter(), pVertex2.toPoint());
      tAngle = AngleHelper.getAngle(tVertex2.toPoint(), template.getCenter(), tVertex1.toPoint());
    }
    double angleDiff = AngleHelper.getDiffAngle(pAngle, tAngle);
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

    if (match1on1) {
      pAngle = AngleHelper.getAngle(pVertex1.toPoint(), pattern.getCenter(), pVertex2.toPoint());
      tAngle = AngleHelper.getAngle(tVertex1.toPoint(), template.getCenter(), tVertex2.toPoint());
    } else {
      pAngle = AngleHelper.getAngle(pVertex1.toPoint(), pattern.getCenter(), pVertex2.toPoint());
      tAngle = AngleHelper.getAngle(tVertex2.toPoint(), template.getCenter(), tVertex1.toPoint());
    }
    double angleDiff = AngleHelper.getDiffAngle(pAngle, tAngle);
    double angleRatio = (180 - angleDiff) / 180;
    angleRatio += lenghtBonus + 0.05;
    if (angleRatio > 1) {
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

    // distanceRatio4) / 4;

    // TODO: umbauen zu Winkel zwischen Kantenmittelpunkten
    Point patternCenter = pattern.getCenter();
    Point templateCenter = template.getCenter();
    double angle_v1pa_v1pb = AngleHelper.getAngle(patternCenter, v1pa.toPoint(), v1pb.toPoint());
    double angle_v1ta_v1tb = AngleHelper.getAngle(templateCenter, v1ta.toPoint(), v1tb.toPoint());
    double angleDiff1 = AngleHelper.getDiffAngle(angle_v1pa_v1pb, angle_v1ta_v1tb);

    double angle_v2pa_v2pb = AngleHelper.getAngle(patternCenter, v2pa.toPoint(), v2pb.toPoint());
    double angle_v2ta_v2tb = AngleHelper.getAngle(templateCenter, v2ta.toPoint(), v2tb.toPoint());
View Full Code Here

Examples of graphmatcher.graph.Vertex.toPoint()

    double angleRatio = (360d - angleDiff1 - angleDiff2) / 360d;

    Point pCenter = pattern.getCenter();
    double v1paDistance = DistanceHelper.getDistance(pCenter, v1pa.toPoint()) / averageDistanceInPattern;
    double v2paDistance = DistanceHelper.getDistance(pCenter, v2pa.toPoint()) / averageDistanceInPattern;
    double v1pbDistance = DistanceHelper.getDistance(pCenter, v1pb.toPoint()) / averageDistanceInPattern;
    double v2pbDistance = DistanceHelper.getDistance(pCenter, v2pb.toPoint()) / averageDistanceInPattern;

    Point tCenter = template.getCenter();
    double v1taDistance = DistanceHelper.getDistance(tCenter, v1ta.toPoint()) / averageDistanceInTemplate;
    double v2taDistance = DistanceHelper.getDistance(tCenter, v2ta.toPoint()) / averageDistanceInTemplate;
View Full Code Here

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