[Geom4j-developer] SF.net SVN: geom4j:[29] trunk/src/net/sourceforge/geom4j/ SegmentIntersectionAlg
Status: Pre-Alpha
Brought to you by:
skhenkin
From: <skh...@us...> - 2010-01-15 22:21:32
|
Revision: 29 http://geom4j.svn.sourceforge.net/geom4j/?rev=29&view=rev Author: skhenkin Date: 2010-01-15 22:21:21 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Precision bug fixed in Bentley-Ottmann algorithm implementation Modified Paths: -------------- trunk/src/net/sourceforge/geom4j/SegmentIntersectionAlgorithmTest.java Modified: trunk/src/net/sourceforge/geom4j/SegmentIntersectionAlgorithmTest.java =================================================================== --- trunk/src/net/sourceforge/geom4j/SegmentIntersectionAlgorithmTest.java 2010-01-15 15:23:21 UTC (rev 28) +++ trunk/src/net/sourceforge/geom4j/SegmentIntersectionAlgorithmTest.java 2010-01-15 22:21:21 UTC (rev 29) @@ -221,7 +221,7 @@ * |/ \| * +----+ */ - final int N = 3; // number of vertices in the graph + final int N = 30; // number of vertices in the graph final double X1 = 0, X2 = 1000, Y1 = 0, Y2 = 1000; // generate random point set PointSet ps = new PointSet(); @@ -240,13 +240,12 @@ } } } -System.out.println(ss); - System.out.println(System.currentTimeMillis()); + //System.out.println(System.currentTimeMillis()); PointSet naiveSet = ss.getAllIntersectionPoints(SegmentIntersectionAlgorithm.NAIVE); - System.out.println(System.currentTimeMillis()); + //System.out.println(System.currentTimeMillis()); PointSet boSet = ss.getAllIntersectionPoints(SegmentIntersectionAlgorithm.BENTLEY_OTTMANN); - System.out.println(System.currentTimeMillis()); - System.out.println(naiveSet.size()); + //System.out.println(System.currentTimeMillis()); + //System.out.println(naiveSet.size()); assertEquals(naiveSet, boSet); } @@ -297,9 +296,13 @@ ss.add(new Segment(new Point(x1, y1), new Point(x2, y2))); } } + //System.out.println(System.currentTimeMillis()); PointSet naiveSet = ss.getAllIntersectionPoints(SegmentIntersectionAlgorithm.NAIVE); + //System.out.println(System.currentTimeMillis()); assertEquals(intersections, naiveSet); + //System.out.println(System.currentTimeMillis()); PointSet boSet = ss.getAllIntersectionPoints(SegmentIntersectionAlgorithm.BENTLEY_OTTMANN); + //System.out.println(System.currentTimeMillis()); assertEquals(naiveSet, boSet); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |