Class DirectedAcyclicGraph.Region

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    DirectedAcyclicGraph<V,​E>

    public static class DirectedAcyclicGraph.Region
    extends java.lang.Object
    implements java.io.Serializable
    Region is an *inclusive* range of indices. Esthetically displeasing, but convenient for our purposes.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Region​(int start, int finish)
      Construct a new region.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getSize()
      Get the size of the region.
      boolean isIn​(int index)
      Check if index is in the region.
      • Methods inherited from class java.lang.Object

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

      • start

        public final int start
      • finish

        public final int finish
    • Constructor Detail

      • Region

        public Region​(int start,
                      int finish)
        Construct a new region.
        Parameters:
        start - the start of the region
        finish - the end of the region (inclusive)
    • Method Detail

      • getSize

        public int getSize()
        Get the size of the region.
        Returns:
        the size of the region
      • isIn

        public boolean isIn​(int index)
        Check if index is in the region.
        Parameters:
        index - the index to check
        Returns:
        true if the index is in the region, false otherwise