|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbr.usp.ime.klava.segmentit.structures.HierarchyEdge
public class HierarchyEdge
Represents an edge linking nodes in hierarchical structures.
Constructor Summary | |
---|---|
HierarchyEdge(int weight,
HierarchyNode node1,
HierarchyNode node2,
EdgeType type)
Creates an edge linking node1 and node2 . |
Method Summary | |
---|---|
int |
compareTo(HierarchyEdge otherEdge)
Used for ordering Edge s. |
EdgeType |
getEdgeType()
Getter for the type property. |
HierarchyNode |
getNode1()
Getter for the node1 . |
HierarchyNode |
getNode2()
Getter for the node2 . |
int |
getWeight()
Getter for the weight . |
void |
setEdgeType(EdgeType type)
Setter for the type property. |
void |
setWeight(int weight)
Setter for the weight . |
java.lang.String |
toString()
Returns a description of this Edge , if the following format:
(node1.getLabel() , node2.getLabel() ):
weight type |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HierarchyEdge(int weight, HierarchyNode node1, HierarchyNode node2, EdgeType type)
node1
and node2
.
weight
- the weight given to this edgenode1
- a HierarchyNode
adjacent to node2
node2
- a HierarchyNode
adjacent to node1
type
- the type of this edgeMethod Detail |
---|
public HierarchyNode getNode1()
node1
.
node1
public HierarchyNode getNode2()
node2
.
node2
public int getWeight()
weight
.
weight
public void setWeight(int weight)
weight
.
weight
- the new weight
public EdgeType getEdgeType()
type
property.
public void setEdgeType(EdgeType type)
type
property.
type
- the new value of type
public int compareTo(HierarchyEdge otherEdge)
Edge
s. It orders first the DEFAULT edges,
then the INTERNAL_LIMITED_REGION edges and finally the EXTERNAL edges in
order to guarantee a determined structure in the
TreeOfCriticalLakes
.
compareTo
in interface java.lang.Comparable<HierarchyEdge>
public java.lang.String toString()
Edge
, if the following format:
(node1.getLabel()
, node2.getLabel()
):
weight
type
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |