git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] asfgit closed pull request #13: GEOMETRY-20


asfgit closed pull request #13: GEOMETRY-20
URL: https://github.com/apache/commons-geometry/pull/13
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
index b37c4ea..043cccc 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
@@ -36,13 +36,6 @@
      */
     V getZero();
 
-    /** Get the L<sub>1</sub> norm for the vector. This is defined as the
-     * sum of the absolute values of all vector components.
-     * @see <a href="http://mathworld.wolfram.com/L1-Norm.html";>L1 Norm</a>
-     * @return L<sub>1</sub> norm for the vector
-     */
-    double getNorm1();
-
     /** Get the L<sub>2</sub> norm (commonly known as the Euclidean norm) for the vector.
      * This corresponds to the common notion of vector magnitude or length and
      * is defined as the square root of the sum of the squares of all vector components.
@@ -58,13 +51,6 @@
      */
     double getNormSq();
 
-    /** Get the L<sub>&infin;</sub> norm for the vector. This is defined as the
-     * maximum of the absolute values of all vector components.
-     * @see <a href="http://mathworld.wolfram.com/L-Infinity-Norm.html";>L<sub>&infin;</sub> Norm</a>
-     * @return L<sub>&infin;</sub> norm for the vector
-     */
-    double getNormInf();
-
     /** Returns a vector with the same direction but with the given
      * norm. This is equivalent to calling {@code vec.normalize().scalarMultiply(mag)}
      * but without the intermediate vector.
@@ -117,32 +103,12 @@
      */
     V scalarMultiply(double a);
 
-    /** Compute the distance between the instance and another vector according to the L<sub>1</sub> norm.
-     * <p>Calling this method is equivalent to calling:
-     * <code>q.subtract(p).getNorm1()</code> except that no intermediate
-     * vector is built</p>
-     * @see #getNorm1()
-     * @param v second vector
-     * @return the distance between the instance and p according to the L<sub>1</sub> norm
-     */
-    double distance1(V v);
-
     /** Compute the distance between the instance and another vector.
      * @param v second vector
      * @return the distance between the instance and v
      */
     double distance(V v);
 
-    /** Compute the distance between the instance and another vector according to the L<sub>&infin;</sub> norm.
-     * <p>Calling this method is equivalent to calling:
-     * <code>q.subtract(p).getNormInf()</code> except that no intermediate
-     * vector is built</p>
-     * @see #getNormInf()
-     * @param v second vector
-     * @return the distance between the instance and p according to the L<sub>&infin;</sub> norm
-     */
-    double distanceInf(V v);
-
     /** Compute the square of the distance between the instance and another vector.
      * <p>Calling this method is equivalent to calling:
      * <code>q.subtract(p).getNormSq()</code> except that no intermediate
diff --git a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/euclidean/threed/enclosing/SphereGenerator.java b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/euclidean/threed/enclosing/SphereGenerator.java
index b0ada02..0111191 100644
--- a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/euclidean/threed/enclosing/SphereGenerator.java
+++ b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/euclidean/threed/enclosing/SphereGenerator.java
@@ -21,6 +21,7 @@
 
 import org.apache.commons.geometry.enclosing.EnclosingBall;
 import org.apache.commons.geometry.enclosing.SupportBallGenerator;
+import org.apache.commons.geometry.euclidean.threed.Cartesian3D;
 import org.apache.commons.geometry.euclidean.threed.Plane;
 import org.apache.commons.geometry.euclidean.threed.Point3D;
 import org.apache.commons.geometry.euclidean.twod.Point2D;
@@ -53,7 +54,7 @@
 
                         // delegate to 2D disk generator
                         final Plane p = new Plane(vA, vB, vC,
-                                                  1.0e-10 * (vA.asVector().getNorm1() + vB.asVector().getNorm1() + vC.asVector().getNorm1()));
+                                                  1.0e-10 * (norm1(vA) + norm1(vB) + norm1(vC)));
                         final EnclosingBall<Point2D> disk =
                                 new DiskGenerator().ballOnSupport(Arrays.asList(p.toSubSpace(vA),
                                                                                 p.toSubSpace(vB),
@@ -149,4 +150,13 @@ private BigFraction minor(final BigFraction[] c1, final BigFraction[] c2, final
                 add(c2[3].multiply(c3[2]).multiply(c1[1].subtract(c1[0])));
     }
 
+    /** Compute the L<sub>1</sub> vector norm for the given set of coordinates.
+     * This is defined as the sum of the absolute values of all components.
+     * @param coord set of coordinates
+     * @return L<sub>1</sub> vector norm for the given set of coordinates
+     * @see <a href="http://mathworld.wolfram.com/L1-Norm.html";>L1 Norm</a>
+     */
+    private double norm1(final Cartesian3D coord) {
+        return Math.abs(coord.getX()) + Math.abs(coord.getY()) + Math.abs(coord.getZ());
+    }
 }
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
index cc054a5..ddf5883 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
@@ -36,7 +36,6 @@ public static boolean isRealNonZero(final double value) {
         return Double.isFinite(value) && value != 0.0;
     }
 
-
     /** Throws an {@link IllegalNormException} if the given norm value
      * is not real (ie, not NaN or infinite) or zero. The argument is returned
      * to allow this method to be called inline.
@@ -64,39 +63,6 @@ public static double checkedNorm(final Vector<?> vec) {
         return checkedNorm(vec.getNorm());
     }
 
-    /** Get the L<sub>1</sub> norm for the vector with the given components.
-     * This is defined as the sum of the absolute values of all vector components.
-     * @param x vector component
-     * @return L<sub>1</sub> norm for the vector with the given components
-     * @see <a href="http://mathworld.wolfram.com/L1-Norm.html";>L1 Norm</a>
-     */
-    public static double norm1(final double x) {
-        return Math.abs(x);
-    }
-
-    /** Get the L<sub>1</sub> norm for the vector with the given components.
-     * This is defined as the sum of the absolute values of all vector components.
-     * @param x1 first vector component
-     * @param x2 second vector component
-     * @return L<sub>1</sub> norm for the vector with the given components
-     * @see <a href="http://mathworld.wolfram.com/L1-Norm.html";>L1 Norm</a>
-     */
-    public static double norm1(final double x1, final double x2) {
-        return Math.abs(x1) + Math.abs(x2);
-    }
-
-    /** Get the L<sub>1</sub> norm for the vector with the given components.
-     * This is defined as the sum of the absolute values of all vector components.
-     * @param x1 first vector component
-     * @param x2 second vector component
-     * @param x3 third vector component
-     * @return L<sub>1</sub> norm for the vector with the given components
-     * @see <a href="http://mathworld.wolfram.com/L1-Norm.html";>L1 Norm</a>
-     */
-    public static double norm1(final double x1, final double x2, final double x3) {
-        return Math.abs(x1) + Math.abs(x2) + Math.abs(x3);
-    }
-
     /** Get the L<sub>2</sub> norm (commonly known as the Euclidean norm) for the vector
      * with the given components. This corresponds to the common notion of vector magnitude
      * or length and is defined as the square root of the sum of the squares of all vector components.
@@ -168,37 +134,4 @@ public static double normSq(final double x1, final double x2) {
     public static double normSq(final double x1, final double x2, final double x3) {
         return (x1 * x1) + (x2 * x2) + (x3 * x3);
     }
-
-    /** Get the L<sub>&infin;</sub> norm for the vector with the given components. This is defined
-     * as the maximum of the absolute values of all vector components.
-     * @param x vector component
-     * @return L<sub>&infin;</sub> norm for the vector with the given components
-     * @see <a href="http://mathworld.wolfram.com/L-Infinity-Norm.html";>L<sub>&infin;</sub> Norm</a>
-     */
-    public static double normInf(final double x) {
-        return Math.abs(x);
-    }
-
-    /** Get the L<sub>&infin;</sub> norm for the vector with the given components. This is defined
-     * as the maximum of the absolute values of all vector components.
-     * @param x1 first vector component
-     * @param x2 second vector component
-     * @return L<sub>&infin;</sub> norm for the vector with the given components
-     * @see <a href="http://mathworld.wolfram.com/L-Infinity-Norm.html";>L<sub>&infin;</sub> Norm</a>
-     */
-    public static double normInf(final double x1, final double x2) {
-        return Math.max(Math.abs(x1), Math.abs(x2));
-    }
-
-    /** Get the L<sub>&infin;</sub> norm for the vector with the given components. This is defined
-     * as the maximum of the absolute values of all vector components.
-     * @param x1 first vector component
-     * @param x2 second vector component
-     * @param x3 third vector component
-     * @return L<sub>&infin;</sub> norm for the vector with the given components
-     * @see <a href="http://mathworld.wolfram.com/L-Infinity-Norm.html";>L<sub>&infin;</sub> Norm</a>
-     */
-    public static double normInf(final double x1, final double x2, final double x3) {
-        return Math.max(Math.max(Math.abs(x1), Math.abs(x2)), Math.abs(x3));
-    }
 }
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Vector1D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Vector1D.java
index 97cba0a..7b1507b 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Vector1D.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Vector1D.java
@@ -78,12 +78,6 @@ public Vector1D getZero() {
         return ZERO;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double getNorm1() {
-        return Vectors.norm1(getX());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double getNorm() {
@@ -96,12 +90,6 @@ public double getNormSq() {
         return Vectors.normSq(getX());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double getNormInf() {
-        return Vectors.normInf(getX());
-    }
-
     /** {@inheritDoc} */
     @Override
     public Vector1D withNorm(double magnitude) {
@@ -152,24 +140,12 @@ public Vector1D scalarMultiply(double a) {
         return new Vector1D(a * getX());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double distance1(Vector1D v) {
-        return Vectors.norm1(getX() - v.getX());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double distance(Vector1D v) {
         return Vectors.norm(getX() - v.getX());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double distanceInf(Vector1D v) {
-        return Vectors.normInf(getX() - v.getX());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double distanceSq(Vector1D v) {
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Vector3D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Vector3D.java
index c075ff2..13f6da7 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Vector3D.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Vector3D.java
@@ -94,12 +94,6 @@ public Vector3D lerp(Vector3D p, double t) {
         return linearCombination(1.0 - t, this, t, p);
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double getNorm1() {
-        return Vectors.norm1(getX(), getY(), getZ());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double getNorm() {
@@ -112,12 +106,6 @@ public double getNormSq() {
         return Vectors.normSq(getX(), getY(), getZ());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double getNormInf() {
-        return Vectors.normInf(getX(), getY(), getZ());
-    }
-
     /** {@inheritDoc} */
     @Override
     public Vector3D withNorm(double magnitude) {
@@ -188,16 +176,6 @@ public Vector3D scalarMultiply(double a) {
         return new Vector3D(a * getX(), a * getY(), a * getZ());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double distance1(Vector3D v) {
-        return Vectors.norm1(
-                    getX() - v.getX(),
-                    getY() - v.getY(),
-                    getZ() - v.getZ()
-                );
-    }
-
     /** {@inheritDoc} */
     @Override
     public double distance(Vector3D v) {
@@ -208,16 +186,6 @@ public double distance(Vector3D v) {
             );
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double distanceInf(Vector3D v) {
-        return Vectors.normInf(
-                getX() - v.getX(),
-                getY() - v.getY(),
-                getZ() - v.getZ()
-            );
-    }
-
     /** {@inheritDoc} */
     @Override
     public double distanceSq(Vector3D v) {
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Vector2D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Vector2D.java
index 3a936f9..9915a32 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Vector2D.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Vector2D.java
@@ -85,12 +85,6 @@ public Vector2D getZero() {
         return ZERO;
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double getNorm1() {
-        return Vectors.norm1(getX(), getY());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double getNorm() {
@@ -103,12 +97,6 @@ public double getNormSq() {
         return Vectors.normSq(getX(), getY());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double getNormInf() {
-        return Vectors.normInf(getX(), getY());
-    }
-
     /** {@inheritDoc} */
     @Override
     public Vector2D withNorm(double magnitude) {
@@ -162,24 +150,12 @@ public Vector2D scalarMultiply(double a) {
         return new Vector2D(a * getX(), a * getY());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double distance1(Vector2D v) {
-        return Vectors.norm1(getX() - v.getX(), getY() - v.getY());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double distance(Vector2D v) {
         return Vectors.norm(getX() - v.getX(), getY() - v.getY());
     }
 
-    /** {@inheritDoc} */
-    @Override
-    public double distanceInf(Vector2D v) {
-        return Vectors.normInf(getX() - v.getX(), getY() - v.getY());
-    }
-
     /** {@inheritDoc} */
     @Override
     public double distanceSq(Vector2D v) {
diff --git a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/internal/VectorsTest.java b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/internal/VectorsTest.java
index 207df63..2264641 100644
--- a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/internal/VectorsTest.java
+++ b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/internal/VectorsTest.java
@@ -84,44 +84,6 @@ public void testCheckedNorm_vectorArg() {
                 IllegalNormException.class, "Illegal norm: Infinity");
     }
 
-    @Test
-    public void testNorm1_oneD() {
-        // act/assert
-        Assert.assertEquals(0.0, Vectors.norm1(0.0), EPS);
-
-        Assert.assertEquals(2.0, Vectors.norm1(-2.0), EPS);
-        Assert.assertEquals(1.0, Vectors.norm1(-1.0), EPS);
-
-        Assert.assertEquals(1.0, Vectors.norm1(1.0), EPS);
-        Assert.assertEquals(2.0, Vectors.norm1(2.0), EPS);
-    }
-
-    @Test
-    public void testNorm1_twoD() {
-        // act/assert
-        Assert.assertEquals(0.0, Vectors.norm1(0.0, 0.0), EPS);
-
-        Assert.assertEquals(3.0, Vectors.norm1(1.0, 2.0), EPS);
-        Assert.assertEquals(7.0, Vectors.norm1(3.0, -4.0), EPS);
-        Assert.assertEquals(11.0, Vectors.norm1(-5.0, 6.0), EPS);
-        Assert.assertEquals(16.0, Vectors.norm1(-7.0, -9.0), EPS);
-    }
-
-    @Test
-    public void testNorm1_threeD() {
-        // act/assert
-        Assert.assertEquals(0.0, Vectors.norm1(0.0, 0.0, 0.0), EPS);
-
-        Assert.assertEquals(6.0, Vectors.norm1(1.0, 2.0, 3.0), EPS);
-        Assert.assertEquals(15.0, Vectors.norm1(4.0, 5.0, -6.0), EPS);
-        Assert.assertEquals(24.0, Vectors.norm1(7.0, -8.0, 9.0), EPS);
-        Assert.assertEquals(33.0, Vectors.norm1(10.0, -11.0, -12.0), EPS);
-        Assert.assertEquals(42.0, Vectors.norm1(-13.0, 14.0, 15.0), EPS);
-        Assert.assertEquals(51.0, Vectors.norm1(-16.0, 17.0, -18.0), EPS);
-        Assert.assertEquals(60.0, Vectors.norm1(-19.0, -20.0, 21.0), EPS);
-        Assert.assertEquals(69.0, Vectors.norm1(-22.0, -23.0, -24.0), EPS);
-    }
-
     @Test
     public void testNorm_oneD() {
         // act/assert
@@ -197,42 +159,4 @@ public void testNormSq_threeD() {
         Assert.assertEquals(1202.0, Vectors.normSq(-19.0, -20.0, 21.0), EPS);
         Assert.assertEquals(1589.0, Vectors.normSq(-22.0, -23.0, -24.0), EPS);
     }
-
-    @Test
-    public void testNormInf_oneD() {
-        // act/assert
-        Assert.assertEquals(0.0, Vectors.normInf(0.0), EPS);
-
-        Assert.assertEquals(2.0, Vectors.normInf(-2.0), EPS);
-        Assert.assertEquals(1.0, Vectors.normInf(-1.0), EPS);
-
-        Assert.assertEquals(1.0, Vectors.normInf(1.0), EPS);
-        Assert.assertEquals(2.0, Vectors.normInf(2.0), EPS);
-    }
-
-    @Test
-    public void testNormInf_twoD() {
-        // act/assert
-        Assert.assertEquals(0.0, Vectors.normInf(0.0, 0.0), EPS);
-
-        Assert.assertEquals(2.0, Vectors.normInf(2.0, 1.0), EPS);
-        Assert.assertEquals(4.0, Vectors.normInf(3.0, -4.0), EPS);
-        Assert.assertEquals(6.0, Vectors.normInf(-6.0, 5.0), EPS);
-        Assert.assertEquals(9.0, Vectors.normInf(-7.0, -9.0), EPS);
-    }
-
-    @Test
-    public void testNormInf_threeD() {
-        // act/assert
-        Assert.assertEquals(0.0, Vectors.normInf(0.0, 0.0, 0.0), EPS);
-
-        Assert.assertEquals(3.0, Vectors.normInf(1.0, 3.0, 2.0), EPS);
-        Assert.assertEquals(6.0, Vectors.normInf(6.0, 5.0, -4.0), EPS);
-        Assert.assertEquals(9.0, Vectors.normInf(7.0, -9.0, 8.0), EPS);
-        Assert.assertEquals(12.0, Vectors.normInf(10.0, -11.0, -12.0), EPS);
-        Assert.assertEquals(15.0, Vectors.normInf(-13.0, 14.0, 15.0), EPS);
-        Assert.assertEquals(18.0, Vectors.normInf(-16.0, 17.0, -18.0), EPS);
-        Assert.assertEquals(21.0, Vectors.normInf(-21.0, -19.0, 20.0), EPS);
-        Assert.assertEquals(24.0, Vectors.normInf(-22.0, -23.0, -24.0), EPS);
-    }
 }
diff --git a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/Vector1DTest.java b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/Vector1DTest.java
index effc704..df90a7a 100644
--- a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/Vector1DTest.java
+++ b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/oned/Vector1DTest.java
@@ -77,14 +77,6 @@ public void testZero() {
         checkPoint(Point1D.ONE.add(zero), 1.0);
     }
 
-    @Test
-    public void testNorm1() {
-        // act/assert
-        Assert.assertEquals(0.0, Vector1D.ZERO.getNorm1(), TEST_TOLERANCE);
-        Assert.assertEquals(6.0, Vector1D.of(6).getNorm1(), TEST_TOLERANCE);
-        Assert.assertEquals(6.0, Vector1D.of(-6).getNorm1(), TEST_TOLERANCE);
-    }
-
     @Test
     public void testNorm() {
         // act/assert
@@ -101,14 +93,6 @@ public void testNormSq() {
         Assert.assertEquals(9.0, Vector1D.of(-3).getNormSq(), TEST_TOLERANCE);
     }
 
-    @Test
-    public void testNormInf() {
-        // act/assert
-        Assert.assertEquals(0.0, Vector1D.ZERO.getNormInf(), TEST_TOLERANCE);
-        Assert.assertEquals(3.0, Vector1D.of(3).getNormInf(), TEST_TOLERANCE);
-        Assert.assertEquals(3.0, Vector1D.of(-3).getNormInf(), TEST_TOLERANCE);
-    }
-
     @Test
     public void testWithNorm() {
         // act/assert
@@ -260,22 +244,6 @@ public void testScalarMultiply() {
         checkVector(Vector1D.of(-1.5).scalarMultiply(7), -10.5);
     }
 
-    @Test
-    public void testDistance1() {
-        // arrange
-        Vector1D v1 = Vector1D.of(1);
-        Vector1D v2 = Vector1D.of(-4);
-
-        // act/assert
-        Assert.assertEquals(0.0, v1.distance1(v1), TEST_TOLERANCE);
-
-        Assert.assertEquals(5.0, v1.distance1(v2), TEST_TOLERANCE);
-        Assert.assertEquals(5.0, v2.distance1(v1), TEST_TOLERANCE);
-        Assert.assertEquals(v1.subtract(v2).getNorm1(), v1.distance1(v2), TEST_TOLERANCE);
-
-        Assert.assertEquals(0.0, Vector1D.of(-1).distance1(Vector1D.of(-1)), TEST_TOLERANCE);
-    }
-
     @Test
     public void testDistance() {
         // arrange
@@ -292,20 +260,6 @@ public void testDistance() {
         Assert.assertEquals(0.0, Vector1D.of(-1).distance(Vector1D.of(-1)), TEST_TOLERANCE);
     }
 
-    @Test
-    public void testDistanceInf() {
-        // arrange
-        Vector1D v1 = Vector1D.of(1);
-        Vector1D v2 = Vector1D.of(-4);
-
-        // act/assert
-        Assert.assertEquals(0.0, Vector1D.of(-1).distanceInf(Vector1D.of(-1)), TEST_TOLERANCE);
-        Assert.assertEquals(5.0, v1.distanceInf(v2), TEST_TOLERANCE);
-        Assert.assertEquals(5.0, v2.distanceInf(v1), TEST_TOLERANCE);
-
-        Assert.assertEquals(v1.subtract(v2).getNormInf(), v1.distanceInf(v2), TEST_TOLERANCE);
-    }
-
     @Test
     public void testDistanceSq() {
         // arrange
diff --git a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/Vector3DTest.java b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/Vector3DTest.java
index 0997f57..b555e2b 100644
--- a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/Vector3DTest.java
+++ b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/Vector3DTest.java
@@ -93,14 +93,6 @@ public void testAsPoint() {
                 Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY);
     }
 
-    @Test
-    public void testNorm1() {
-        // act/assert
-        Assert.assertEquals(0.0, Vector3D.ZERO.getNorm1(), EPS);
-        Assert.assertEquals(9.0, Vector3D.of(2, -3, 4).getNorm1(), EPS);
-        Assert.assertEquals(9.0, Vector3D.of(-2, 3, -4).getNorm1(), EPS);
-    }
-
     @Test
     public void testNorm() {
         // act/assert
@@ -117,14 +109,6 @@ public void testNormSq() {
         Assert.assertEquals(29, Vector3D.of(-2, -3, -4).getNormSq(), EPS);
     }
 
-    @Test
-    public void testNormInf() {
-        // act/assert
-        Assert.assertEquals(0.0, Vector3D.ZERO.getNormInf(), 0);
-        Assert.assertEquals(4, Vector3D.of(2, 3, 4).getNormInf(), EPS);
-        Assert.assertEquals(4, Vector3D.of(-2, -3, -4).getNormInf(), EPS);
-    }
-
     @Test
     public void testWithNorm() {
         // arrange
@@ -552,26 +536,6 @@ public void testScalarMultiply() {
         checkVector(v2.scalarMultiply(-2), 4, 6, 8);
     }
 
-    @Test
-    public void testDistance1() {
-        // arrange
-        Vector3D v1 = Vector3D.of(1, -2, 3);
-        Vector3D v2 = Vector3D.of(-4, 2, 0);
-        Vector3D v3 = Vector3D.of(5, -6, -7);
-
-        // act/assert
-        Assert.assertEquals(0.0, v1.distance1(v1), EPS);
-        Assert.assertEquals(0.0, v2.distance1(v2), EPS);
-
-        Assert.assertEquals(12.0, v1.distance1(v2), EPS);
-        Assert.assertEquals(12.0, v2.distance1(v1), EPS);
-
-        Assert.assertEquals(v1.subtract(v2).getNorm1(), v1.distance1(v2), EPS);
-
-        Assert.assertEquals(18, v1.distance1(v3), EPS);
-        Assert.assertEquals(18, v3.distance1(v1), EPS);
-    }
-
     @Test
     public void testDistance() {
         // arrange
@@ -612,26 +576,6 @@ public void testDistanceSq() {
         Assert.assertEquals(132, v3.distanceSq(v1), EPS);
   }
 
-    @Test
-    public void testDistanceInf() {
-        // arrange
-        Vector3D v1 = Vector3D.of(1, -2, 3);
-        Vector3D v2 = Vector3D.of(-4, 2, 0);
-        Vector3D v3 = Vector3D.of(5, -6, -7);
-
-        // act/assert
-        Assert.assertEquals(0.0, v1.distanceInf(v1), EPS);
-        Assert.assertEquals(0.0, v2.distanceInf(v2), EPS);
-
-        Assert.assertEquals(5, v1.distanceInf(v2), EPS);
-        Assert.assertEquals(5, v2.distanceInf(v1), EPS);
-
-        Assert.assertEquals(v1.subtract(v2).getNormInf(), v1.distanceInf(v2), EPS);
-
-        Assert.assertEquals(10, v1.distanceInf(v3), EPS);
-        Assert.assertEquals(10, v3.distanceInf(v1), EPS);
-    }
-
     @Test
     public void testDotProduct() {
         // arrange
diff --git a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/twod/Vector2DTest.java b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/twod/Vector2DTest.java
index f1855c3..83a841d 100644
--- a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/twod/Vector2DTest.java
+++ b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/twod/Vector2DTest.java
@@ -77,17 +77,6 @@ public void testGetZero() {
         checkVector(Vector2D.of(1.0, 1.0).getZero(), 0, 0);
     }
 
-    @Test
-    public void testNorm1() {
-        // act/assert
-        Assert.assertEquals(0.0, Vector2D.of(0, 0).getNorm1(), EPS);
-
-        Assert.assertEquals(3.0, Vector2D.of(1, 2).getNorm1(), EPS);
-        Assert.assertEquals(3.0, Vector2D.of(1, -2).getNorm1(), EPS);
-        Assert.assertEquals(3.0, Vector2D.of(-1, 2).getNorm1(), EPS);
-        Assert.assertEquals(3.0, Vector2D.of(-1, -2).getNorm1(), EPS);
-    }
-
     @Test
     public void testNorm() {
         // act/assert
@@ -114,19 +103,6 @@ public void testNormSq() {
         Assert.assertEquals(5.0, Vector2D.of(-1, -2).getNormSq(), EPS);
     }
 
-    @Test
-    public void testNormInf() {
-        // act/assert
-        Assert.assertEquals(0.0, Vector2D.of(0, 0).getNormInf(), EPS);
-
-        Assert.assertEquals(2.0, Vector2D.of(1, 2).getNormInf(), EPS);
-        Assert.assertEquals(2.0, Vector2D.of(1, -2).getNormInf(), EPS);
-        Assert.assertEquals(2.0, Vector2D.of(-1, 2).getNormInf(), EPS);
-        Assert.assertEquals(2.0, Vector2D.of(-1, -2).getNormInf(), EPS);
-
-        Assert.assertEquals(100.0, Vector2D.of(100, -99).getNormInf(), EPS);
-    }
-
     @Test
     public void testWithNorm() {
         // act/assert
@@ -291,23 +267,6 @@ public void testScalarMultiply() {
         checkVector(Vector2D.of(2, 3).scalarMultiply(-1.5), -3, -4.5);
     }
 
-    @Test
-    public void testDistance1() {
-        // arrange
-        Vector2D v1 = Vector2D.of(1, 1);
-        Vector2D v2 = Vector2D.of(4, 5);
-        Vector2D v3 = Vector2D.of(-1, 0);
-
-        // act/assert
-        Assert.assertEquals(0, v1.distance1(v1), EPS);
-
-        Assert.assertEquals(7, v1.distance1(v2), EPS);
-        Assert.assertEquals(7, v2.distance1(v1), EPS);
-
-        Assert.assertEquals(3, v1.distance1(v3), EPS);
-        Assert.assertEquals(3, v3.distance1(v1), EPS);
-    }
-
     @Test
     public void testDistance() {
         // arrange
@@ -342,23 +301,6 @@ public void testDistanceSq() {
         Assert.assertEquals(5, v3.distanceSq(v1), EPS);
     }
 
-    @Test
-    public void testDistanceInf() {
-        // arrange
-        Vector2D v1 = Vector2D.of(1, 1);
-        Vector2D v2 = Vector2D.of(4, 5);
-        Vector2D v3 = Vector2D.of(-1, 0);
-
-        // act/assert
-        Assert.assertEquals(0, v1.distanceInf(v1), EPS);
-
-        Assert.assertEquals(4, v1.distanceInf(v2), EPS);
-        Assert.assertEquals(4, v2.distanceInf(v1), EPS);
-
-        Assert.assertEquals(2, v1.distanceInf(v3), EPS);
-        Assert.assertEquals(2, v3.distanceInf(v1), EPS);
-    }
-
     @Test
     public void testDotProduct() {
         // arrange


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxxx