|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdelaunay.delaunay.VerticalComparator
public class VerticalComparator
The VerticalComparator class will be used to perform sorting and searching operations in vertically sorted lists. We can't use directly the Comparable interface in DEdge, as it is already used for the "left-right" method.
| Constructor Summary | |
|---|---|
VerticalComparator(double x)
Vertical comparator constructor. |
|
| Method Summary | |
|---|---|
int |
compare(DEdge edge1,
DEdge edge2)
This comparison method is a vertical sorting test : Sort two edges (edge1 and edge2, indeed), and sort them according to their intersection point with the line l of equation x=abs. |
double |
getAbs()
get the absciss where we are currently working. |
void |
setAbs(double x)
Set the absciss where we are going to work. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public VerticalComparator(double x)
x - | Method Detail |
|---|
public final void setAbs(double x)
x - public final double getAbs()
public final int compare(DEdge edge1,
DEdge edge2)
compare in interface Comparator<DEdge>edge1 - edge2 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||