|
Algorithm Development Kit 1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalgs.model.problems.segmentIntersection.EventQueue
public class EventQueue
The EventQueue for a horizontal-sweep line algorithm for line segment intersection.
The EventQueue must not be a heap-based implementation, since we will be called upon to test if an EventPoint is already within the Queue.
Constructor Summary | |
---|---|
EventQueue()
Default constructor. |
Method Summary | |
---|---|
boolean |
contains(EventPoint ep)
Determine whether event point already exists within the queue. |
EventPoint |
event(EventPoint ep)
Determine whether event point already exists within the queue, and return the actual event point within the queue if it does. |
void |
insert(EventPoint ep)
Insert the Event Point into the queue, taking care to properly maintain the set of segments associated with this EventPoint if it is indeed has upper Segments. |
boolean |
isEmpty()
Return whether the event queue is empty. |
EventPoint |
min()
Remove and return left-most child [the smallest one]. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventQueue()
Method Detail |
---|
public boolean isEmpty()
public void insert(EventPoint ep)
public EventPoint min()
public boolean contains(EventPoint ep)
ep
- event point to probe forpublic EventPoint event(EventPoint ep)
ep
-
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |