|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbr.usp.ime.klava.segmentit.structures.Edge
public class Edge
Represents an edge linking PrimitiveCatchmentBasin
s in
PrimitiveCatchmentBasinsGraph
s.
Constructor Summary | |
---|---|
Edge(int weight,
Pixel generatorPixel1,
Pixel generatorPixel2,
PrimitiveCatchmentBasin basin1,
PrimitiveCatchmentBasin basin2)
Creates an edge linking basin1 and basin2 . |
Method Summary | |
---|---|
int |
compareTo(Edge otherEdge)
Used for ordering Edge s. |
PrimitiveCatchmentBasin |
getBasin1()
Getter for the basin1 . |
PrimitiveCatchmentBasin |
getBasin2()
Getter for the basin2 . |
Pixel |
getGeneratorPixel1()
Getter for the generatorPixel1 . |
Pixel |
getGeneratorPixel2()
Getter for the generatorPixel2 . |
int |
getWeight()
Getter for the weight . |
void |
setGeneratorPixel1(Pixel pixel)
Setter for the generatorPixel1 . |
void |
setGeneratorPixel2(Pixel pixel)
Setter for the generatorPixel2 . |
void |
setWeight(int weight)
Setter for the weight . |
java.lang.String |
toString()
Returns a description of this Edge , if the following format:
(basin1.getLabel() , basin2.getLabel() ):
weight |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Edge(int weight, Pixel generatorPixel1, Pixel generatorPixel2, PrimitiveCatchmentBasin basin1, PrimitiveCatchmentBasin basin2)
basin1
and basin2
.
weight
- the weight given to this edgegeneratorPixel1
- a Pixel
of basins1
that minimized
the calculated weightgeneratorPixel2
- a Pixel
of basins2
that minimized
the calculated weightbasin1
- a PrimitiveCatchmentBasin
adjacent to
basin2
basin2
- a PrimitiveCatchmentBasin
adjacent to
basin1
Method Detail |
---|
public PrimitiveCatchmentBasin getBasin1()
basin1
.
basin1
public PrimitiveCatchmentBasin getBasin2()
basin2
.
basin2
public int getWeight()
weight
.
weight
public void setWeight(int weight)
weight
.
weight
- the new weight
public Pixel getGeneratorPixel1()
generatorPixel1
.
generatorPixel1
public void setGeneratorPixel1(Pixel pixel)
generatorPixel1
.
pixel
- the new generatorPixel1
public Pixel getGeneratorPixel2()
generatorPixel2
.
generatorPixel2
public void setGeneratorPixel2(Pixel pixel)
generatorPixel2
.
pixel
- the new generatorPixel2
public int compareTo(Edge otherEdge)
Edge
s.
compareTo
in interface java.lang.Comparable<Edge>
public java.lang.String toString()
Edge
, if the following format:
(basin1.getLabel()
, basin2.getLabel()
):
weight
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |