Package inra.ijpb.label
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
-
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 label1The first label. -
label2
public final int label2The 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
- Specified by:
compareTo
in interfacejava.lang.Comparable<RegionAdjacencyGraph.LabelPair>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-