Class RegionAdjacencyGraph.LabelPair

java.lang.Object
inra.ijpb.label.RegionAdjacencyGraph.LabelPair
All Implemented Interfaces:
java.lang.Comparable<RegionAdjacencyGraph.LabelPair>
Enclosing class:
RegionAdjacencyGraph

public static final class RegionAdjacencyGraph.LabelPair
extends java.lang.Object
implements java.lang.Comparable<RegionAdjacencyGraph.LabelPair>
Used to stores the adjacency information between two regions. In order to ensure symmetry of the relation, the value of label1 field always contains the lower label, while the value of label2 always contains the highest label.
  • Field Summary

    Fields
    Modifier and Type Field Description
    int label1
    The first label.
    int label2
    The second label.
  • Constructor Summary

    Constructors
    Constructor Description
    LabelPair​(int label1, int label2)
    Creates a new Label Pair.
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(RegionAdjacencyGraph.LabelPair pair)  
    boolean equals​(java.lang.Object obj)  
    int hashCode()  

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • label1

      public final int label1
      The first label.
    • label2

      public final int label2
      The second label.
  • Constructor Details

    • LabelPair

      public LabelPair​(int label1, int label2)
      Creates a new Label Pair.
      Parameters:
      label1 - the first label.
      label2 - the second label.
  • Method Details

    • compareTo

      public int compareTo​(RegionAdjacencyGraph.LabelPair pair)
      Specified by:
      compareTo in interface java.lang.Comparable<RegionAdjacencyGraph.LabelPair>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object