|
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.IntersectionDetection
algs.model.problems.segmentIntersection.linkedlist.LineSweep
public class LineSweep
Implementation using linkedList for lineState to show performance degradation as the size of the state increases.
Used as a benchmark, of sorts, to show how the wrong choice of data structure can damage the overall effectiveness of an algorithm.
Field Summary |
---|
Fields inherited from class algs.model.problems.segmentIntersection.IntersectionDetection |
---|
report |
Constructor Summary | |
---|---|
LineSweep()
Construct a sweep object. |
Method Summary | |
---|---|
void |
initialize()
Initialize algorithm. |
java.util.Hashtable<IPoint,ILineSegment[]> |
intersections(ILineSegment[] segs)
Compute the intersection of all segments when given an array of segments. |
Methods inherited from class algs.model.problems.segmentIntersection.IntersectionDetection |
---|
computeTime, intersections, intersections, output, record, record, sameWithinEpsilon, startTime, time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineSweep()
Method Detail |
---|
public void initialize()
initialize
in class IntersectionDetection
public java.util.Hashtable<IPoint,ILineSegment[]> intersections(ILineSegment[] segs)
Returns the report which is maintained by the superclass
intersections
in class IntersectionDetection
segs
- Line segments to be checked for intersections.
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |