Class SubgraphDepthLocater


  • class SubgraphDepthLocater
    extends java.lang.Object
    Locates a subgraph inside a set of subgraphs, in order to determine the outside depth of the subgraph. The input subgraphs are assumed to have had depths already calculated for their edges.
    Version:
    1.7
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  SubgraphDepthLocater.DepthSegment
      A segment from a directed edge which has been assigned a depth value for its sides.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private LineSegment seg  
      private java.util.Collection subgraphs  
    • Constructor Summary

      Constructors 
      Constructor Description
      SubgraphDepthLocater​(java.util.List subgraphs)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.List findStabbedSegments​(Coordinate stabbingRayLeftPt)
      Finds all non-horizontal segments intersecting the stabbing line.
      private void findStabbedSegments​(Coordinate stabbingRayLeftPt, java.util.List dirEdges, java.util.List stabbedSegments)
      Finds all non-horizontal segments intersecting the stabbing line in the list of dirEdges.
      private void findStabbedSegments​(Coordinate stabbingRayLeftPt, DirectedEdge dirEdge, java.util.List stabbedSegments)
      Finds all non-horizontal segments intersecting the stabbing line in the input dirEdge.
      int getDepth​(Coordinate p)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • subgraphs

        private java.util.Collection subgraphs
    • Constructor Detail

      • SubgraphDepthLocater

        public SubgraphDepthLocater​(java.util.List subgraphs)
    • Method Detail

      • getDepth

        public int getDepth​(Coordinate p)
      • findStabbedSegments

        private java.util.List findStabbedSegments​(Coordinate stabbingRayLeftPt)
        Finds all non-horizontal segments intersecting the stabbing line. The stabbing line is the ray to the right of stabbingRayLeftPt.
        Parameters:
        stabbingRayLeftPt - the left-hand origin of the stabbing line
        Returns:
        a List of DepthSegments intersecting the stabbing line
      • findStabbedSegments

        private void findStabbedSegments​(Coordinate stabbingRayLeftPt,
                                         java.util.List dirEdges,
                                         java.util.List stabbedSegments)
        Finds all non-horizontal segments intersecting the stabbing line in the list of dirEdges. The stabbing line is the ray to the right of stabbingRayLeftPt.
        Parameters:
        stabbingRayLeftPt - the left-hand origin of the stabbing line
        stabbedSegments - the current list of DepthSegments intersecting the stabbing line
      • findStabbedSegments

        private void findStabbedSegments​(Coordinate stabbingRayLeftPt,
                                         DirectedEdge dirEdge,
                                         java.util.List stabbedSegments)
        Finds all non-horizontal segments intersecting the stabbing line in the input dirEdge. The stabbing line is the ray to the right of stabbingRayLeftPt.
        Parameters:
        stabbingRayLeftPt - the left-hand origin of the stabbing line
        stabbedSegments - the current list of DepthSegments intersecting the stabbing line