Class GraphUtils


  • public class GraphUtils
    extends Object
    Various algorithms on graphs.
    Author:
    julien Gaffuri
    • Constructor Detail

      • GraphUtils

        public GraphUtils()
    • Method Detail

      • getEdgesInCommon

        public static Set<Edge> getEdgesInCommon​(Face f1,
                                                 Face f2)
      • getLength

        public static double getLength​(Face f1,
                                       Face f2)
      • getArea

        public static double getArea​(Edge e)
      • removeSimilarDuplicateEdges

        public static void removeSimilarDuplicateEdges​(Graph g,
                                                       double haussdorffDistance)
      • findSimilarDuplicateEdgeToRemove

        public static Edge findSimilarDuplicateEdgeToRemove​(Graph g,
                                                            double haussdorffDistance)
      • getLongest

        public static Edge getLongest​(Edge e1,
                                      Edge e2)
      • areConnected

        public static Node areConnected​(Edge e1,
                                        Edge e2)
        Check if two edges are connected. If so, return the connection node.
        Parameters:
        e1 -
        e2 -
        Returns:
      • revert

        public static Edge revert​(Edge e)
      • getEdgeGeometries

        public static Collection<org.locationtech.jts.geom.LineString> getEdgeGeometries​(Graph g)
      • getEdgeGeometries

        public static Collection<org.locationtech.jts.geom.LineString> getEdgeGeometries​(Collection<Edge> es)