[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: svn commit: r1563246 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math3/geometr
From: tn () apache ! org
Date: 2014-01-31 20:24:02
Message-ID: 20140131202402.C643E2388868 () eris ! apache ! org
[Download RAW message or body]
Author: tn
Date: Fri Jan 31 20:24:02 2014
New Revision: 1563246
URL: http://svn.apache.org/r1563246
Log:
Rename to GrahamScan as the algorithm anyway is only defined for the 2D case.
Added:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan.java
- copied, changed from r1562999, \
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2D.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScanTest.java
- copied, changed from r1562999, \
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2DTest.java
Removed:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2D.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2DTest.java
Modified:
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/AklToussaintHeuristicTest.java
commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/geometry/ConvexHullExample.java
Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan.java \
(from r1562999, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2D.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/c \
ommons/math3/geometry/euclidean/twod/hull/GrahamScan.java?p2=commons/proper/math/trunk \
/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan.java&p \
1=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2D.java&r1=1562999&r2=1563246&rev=1563246&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2D.java \
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan.java \
Fri Jan 31 20:24:02 2014 @@ -40,7 +40,7 @@ import org.apache.commons.math3.util.Mat
* @since 3.3
* @version $Id$
*/
-public class GrahamScan2D implements ConvexHullGenerator2D {
+public class GrahamScan implements ConvexHullGenerator2D {
/** Default value for tolerance. */
private static final double DEFAULT_TOLERANCE = 1e-10;
@@ -56,7 +56,7 @@ public class GrahamScan2D implements Con
* <p>
* The default tolerance (1e-10) will be used to determine identical points.
*/
- public GrahamScan2D() {
+ public GrahamScan() {
this(DEFAULT_TOLERANCE);
}
@@ -64,7 +64,7 @@ public class GrahamScan2D implements Con
* Creates a new instance with the given tolerance for determining identical \
points.
* @param tolerance tolerance below which points are considered identical
*/
- public GrahamScan2D(final double tolerance) {
+ public GrahamScan(final double tolerance) {
this.tolerance = tolerance;
}
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/AklToussaintHeuristicTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/c \
ommons/math3/geometry/euclidean/twod/hull/AklToussaintHeuristicTest.java?rev=1563246&r1=1563245&r2=1563246&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/AklToussaintHeuristicTest.java \
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/AklToussaintHeuristicTest.java \
Fri Jan 31 20:24:02 2014 @@ -27,7 +27,7 @@ import org.apache.commons.math3.geometry
public class AklToussaintHeuristicTest extends ConvexHullGenerator2DAbstractTest {
protected ConvexHullGenerator2D createConvexHullGenerator() {
- return new GrahamScan2D();
+ return new GrahamScan();
}
@Override
Copied: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScanTest.java \
(from r1562999, commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2DTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/c \
ommons/math3/geometry/euclidean/twod/hull/GrahamScanTest.java?p2=commons/proper/math/t \
runk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScanTes \
t.java&p1=commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/eu \
clidean/twod/hull/GrahamScan2DTest.java&r1=1562999&r2=1563246&rev=1563246&view=diff \
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScan2DTest.java \
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/hull/GrahamScanTest.java \
Fri Jan 31 20:24:02 2014 @@ -21,17 +21,17 @@ import java.util.Collection;
import java.util.List;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
-import org.apache.commons.math3.geometry.euclidean.twod.hull.GrahamScan2D;
+import org.apache.commons.math3.geometry.euclidean.twod.hull.GrahamScan;
import org.junit.Test;
/**
* Test class for GrahamScan2D.
* @version $Id$
*/
-public class GrahamScan2DTest extends ConvexHullGenerator2DAbstractTest {
+public class GrahamScanTest extends ConvexHullGenerator2DAbstractTest {
protected ConvexHullGenerator2D createConvexHullGenerator() {
- return new GrahamScan2D();
+ return new GrahamScan();
}
// ------------------------------------------------------------------------------
Modified: commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/geometry/ConvexHullExample.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/userguide/java/org/apa \
che/commons/math3/userguide/geometry/ConvexHullExample.java?rev=1563246&r1=1563245&r2=1563246&view=diff
==============================================================================
--- commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/geometry/ConvexHullExample.java \
(original)
+++ commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/geometry/ConvexHullExample.java \
Fri Jan 31 20:24:02 2014 @@ -16,14 +16,14 @@ import javax.swing.JComponent;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
import org.apache.commons.math3.geometry.euclidean.twod.hull.ConvexHull2D;
-import org.apache.commons.math3.geometry.euclidean.twod.hull.GrahamScan2D;
+import org.apache.commons.math3.geometry.euclidean.twod.hull.GrahamScan;
import org.apache.commons.math3.random.MersenneTwister;
import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.userguide.ExampleUtils;
import org.apache.commons.math3.userguide.ExampleUtils.ExampleFrame;
/**
- * Plots 2D samples drawn from various pseudo / quasi-random generators.
+ * Shows how to generate the convex hull of a point cloud in 2D.
*/
public class ConvexHullExample {
@@ -48,7 +48,7 @@ public class ConvexHullExample {
setLayout(new FlowLayout());
- GrahamScan2D generator = new GrahamScan2D();
+ GrahamScan generator = new GrahamScan();
Collection<Vector2D> cloud = createRandomPoints(150);
ConvexHull2D hull = generator.generate(cloud);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic