You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2013/03/10 20:44:31 UTC
svn commit: r1454903 - in /commons/proper/math/trunk/src: changes/
main/java/org/apache/commons/math3/
main/java/org/apache/commons/math3/analysis/differentiation/
main/java/org/apache/commons/math3/dfp/
main/java/org/apache/commons/math3/geometry/eucl...
Author: luc
Date: Sun Mar 10 19:44:31 2013
New Revision: 1454903
URL: http://svn.apache.org/r1454903
Log:
Renamed ExtendedFieldElement into RealFieldElement.
Added:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java (contents, props changed)
- copied, changed from r1454897, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ExtendedFieldElement.java
Removed:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ExtendedFieldElement.java
Modified:
commons/proper/math/trunk/src/changes/changes.xml
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/dfp/Dfp.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Decimal64.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ExtendedFieldElementAbstractTest.java
Modified: commons/proper/math/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/changes/changes.xml (original)
+++ commons/proper/math/trunk/src/changes/changes.xml Sun Mar 10 19:44:31 2013
@@ -81,10 +81,10 @@ This is a minor release: It combines bug
behave across events in ODE events detection.
</action>
<action dev="luc" type="add" >
- Added Hermite interpolator for ExtendFieldElement instances.
+ Added Hermite interpolator for RealFieldElement instances.
</action>
<action dev="luc" type="add" >
- Added ExtendFieldElement interface to represent anything that is
+ Added RealFieldElement interface to represent anything that is
real number like, implemented by both Decimal64, Dfp and DerivativeStructure.
</action>
<action dev="luc" type="add" >
Copied: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java (from r1454897, commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ExtendedFieldElement.java)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java?p2=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java&p1=commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ExtendedFieldElement.java&r1=1454897&r2=1454903&rev=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ExtendedFieldElement.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java Sun Mar 10 19:44:31 2013
@@ -29,7 +29,7 @@ import org.apache.commons.math3.exceptio
* @version $Id$
* @since 3.2
*/
-public interface ExtendedFieldElement<T> extends FieldElement<T> {
+public interface RealFieldElement<T> extends FieldElement<T> {
/** Get the real value of the number.
* @return real value
Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/RealFieldElement.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java Sun Mar 10 19:44:31 2013
@@ -18,7 +18,7 @@ package org.apache.commons.math3.analysi
import java.io.Serializable;
-import org.apache.commons.math3.ExtendedFieldElement;
+import org.apache.commons.math3.RealFieldElement;
import org.apache.commons.math3.Field;
import org.apache.commons.math3.FieldElement;
import org.apache.commons.math3.exception.DimensionMismatchException;
@@ -58,7 +58,7 @@ import org.apache.commons.math3.util.Mat
* @version $Id$
* @since 3.1
*/
-public class DerivativeStructure implements ExtendedFieldElement<DerivativeStructure>, Serializable {
+public class DerivativeStructure implements RealFieldElement<DerivativeStructure>, Serializable {
/** Serializable UID. */
private static final long serialVersionUID = 20120730L;
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/dfp/Dfp.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/dfp/Dfp.java?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/dfp/Dfp.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/dfp/Dfp.java Sun Mar 10 19:44:31 2013
@@ -19,7 +19,7 @@ package org.apache.commons.math3.dfp;
import java.util.Arrays;
-import org.apache.commons.math3.ExtendedFieldElement;
+import org.apache.commons.math3.RealFieldElement;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.util.FastMath;
@@ -95,7 +95,7 @@ import org.apache.commons.math3.util.Fas
* @version $Id$
* @since 2.2
*/
-public class Dfp implements ExtendedFieldElement<Dfp> {
+public class Dfp implements RealFieldElement<Dfp> {
/** The radix, or base of this system. Set to 10000 */
public static final int RADIX = 10000;
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldRotation.java Sun Mar 10 19:44:31 2013
@@ -19,7 +19,7 @@ package org.apache.commons.math3.geometr
import java.io.Serializable;
-import org.apache.commons.math3.ExtendedFieldElement;
+import org.apache.commons.math3.RealFieldElement;
import org.apache.commons.math3.Field;
import org.apache.commons.math3.exception.MathArithmeticException;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
@@ -28,7 +28,7 @@ import org.apache.commons.math3.util.Fas
import org.apache.commons.math3.util.MathArrays;
/**
- * This class is a re-implementation of {@link Rotation} using {@link ExtendedFieldElement}.
+ * This class is a re-implementation of {@link Rotation} using {@link RealFieldElement}.
* <p>Instance of this class are guaranteed to be immutable.</p>
*
* @param <T> the type of the field elements
@@ -38,7 +38,7 @@ import org.apache.commons.math3.util.Mat
* @since 3.2
*/
-public class FieldRotation<T extends ExtendedFieldElement<T>> implements Serializable {
+public class FieldRotation<T extends RealFieldElement<T>> implements Serializable {
/** Serializable version identifier */
private static final long serialVersionUID = 20130224l;
@@ -425,7 +425,7 @@ public class FieldRotation<T extends Ext
/** Get the normalized axis of the rotation.
* @return normalized axis of the rotation
- * @see #FieldRotation(FieldVector3D, ExtendedFieldElement)
+ * @see #FieldRotation(FieldVector3D, RealFieldElement)
*/
public FieldVector3D<T> getAxis() {
final T squaredSine = q1.multiply(q1).add(q2.multiply(q2)).add(q3.multiply(q3));
@@ -442,7 +442,7 @@ public class FieldRotation<T extends Ext
/** Get the angle of the rotation.
* @return angle of the rotation (between 0 and π)
- * @see #FieldRotation(FieldVector3D, ExtendedFieldElement)
+ * @see #FieldRotation(FieldVector3D, RealFieldElement)
*/
public T getAngle() {
if ((q0.getReal() < -0.1) || (q0.getReal() > 0.1)) {
@@ -834,7 +834,7 @@ public class FieldRotation<T extends Ext
* @param <T> the type of the field elements
* @return a new vector which is the image of u by the rotation
*/
- public static <T extends ExtendedFieldElement<T>> FieldVector3D<T> applyTo(final Rotation r, final FieldVector3D<T> u) {
+ public static <T extends RealFieldElement<T>> FieldVector3D<T> applyTo(final Rotation r, final FieldVector3D<T> u) {
final T x = u.getX();
final T y = u.getY();
@@ -931,7 +931,7 @@ public class FieldRotation<T extends Ext
* @param <T> the type of the field elements
* @return a new vector which such that u is its image by the rotation
*/
- public static <T extends ExtendedFieldElement<T>> FieldVector3D<T> applyInverseTo(final Rotation r, final FieldVector3D<T> u) {
+ public static <T extends RealFieldElement<T>> FieldVector3D<T> applyInverseTo(final Rotation r, final FieldVector3D<T> u) {
final T x = u.getX();
final T y = u.getY();
@@ -991,7 +991,7 @@ public class FieldRotation<T extends Ext
* @param <T> the type of the field elements
* @return a new rotation which is the composition of r by the instance
*/
- public static <T extends ExtendedFieldElement<T>> FieldRotation<T> applyTo(final Rotation r1, final FieldRotation<T> rInner) {
+ public static <T extends RealFieldElement<T>> FieldRotation<T> applyTo(final Rotation r1, final FieldRotation<T> rInner) {
return new FieldRotation<T>(rInner.q0.multiply(r1.getQ0()).subtract(rInner.q1.multiply(r1.getQ1()).add(rInner.q2.multiply(r1.getQ2())).add(rInner.q3.multiply(r1.getQ3()))),
rInner.q1.multiply(r1.getQ0()).add(rInner.q0.multiply(r1.getQ1())).add(rInner.q2.multiply(r1.getQ3()).subtract(rInner.q3.multiply(r1.getQ2()))),
rInner.q2.multiply(r1.getQ0()).add(rInner.q0.multiply(r1.getQ2())).add(rInner.q3.multiply(r1.getQ1()).subtract(rInner.q1.multiply(r1.getQ3()))),
@@ -1050,7 +1050,7 @@ public class FieldRotation<T extends Ext
* @return a new rotation which is the composition of r by the inverse
* of the instance
*/
- public static <T extends ExtendedFieldElement<T>> FieldRotation<T> applyInverseTo(final Rotation rOuter, final FieldRotation<T> rInner) {
+ public static <T extends RealFieldElement<T>> FieldRotation<T> applyInverseTo(final Rotation rOuter, final FieldRotation<T> rInner) {
return new FieldRotation<T>(rInner.q0.multiply(rOuter.getQ0()).add(rInner.q1.multiply(rOuter.getQ1()).add(rInner.q2.multiply(rOuter.getQ2())).add(rInner.q3.multiply(rOuter.getQ3()))).negate(),
rInner.q0.multiply(rOuter.getQ1()).add(rInner.q2.multiply(rOuter.getQ3()).subtract(rInner.q3.multiply(rOuter.getQ2()))).subtract(rInner.q1.multiply(rOuter.getQ0())),
rInner.q0.multiply(rOuter.getQ2()).add(rInner.q3.multiply(rOuter.getQ1()).subtract(rInner.q1.multiply(rOuter.getQ3()))).subtract(rInner.q2.multiply(rOuter.getQ0())),
@@ -1177,7 +1177,7 @@ public class FieldRotation<T extends Ext
* @param <T> the type of the field elements
* @return <i>distance</i> between r1 and r2
*/
- public static <T extends ExtendedFieldElement<T>> T distance(final FieldRotation<T> r1, final FieldRotation<T> r2) {
+ public static <T extends RealFieldElement<T>> T distance(final FieldRotation<T> r1, final FieldRotation<T> r2) {
return r1.applyInverseTo(r2).getAngle();
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D.java Sun Mar 10 19:44:31 2013
@@ -20,7 +20,7 @@ package org.apache.commons.math3.geometr
import java.io.Serializable;
import java.text.NumberFormat;
-import org.apache.commons.math3.ExtendedFieldElement;
+import org.apache.commons.math3.RealFieldElement;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.MathArithmeticException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
@@ -28,13 +28,13 @@ import org.apache.commons.math3.util.Fas
import org.apache.commons.math3.util.MathArrays;
/**
- * This class is a re-implementation of {@link Vector3D} using {@link ExtendedFieldElement}.
+ * This class is a re-implementation of {@link Vector3D} using {@link RealFieldElement}.
* <p>Instance of this class are guaranteed to be immutable.</p>
* @param <T> the type of the field elements
* @version $Id$
* @since 3.2
*/
-public class FieldVector3D<T extends ExtendedFieldElement<T>> implements Serializable {
+public class FieldVector3D<T extends RealFieldElement<T>> implements Serializable {
/** Serializable version identifier. */
private static final long serialVersionUID = 20130224L;
@@ -302,7 +302,7 @@ public class FieldVector3D<T extends Ext
/** Get the abscissa of the vector.
* @return abscissa of the vector
- * @see #FieldVector3D(ExtendedFieldElement, ExtendedFieldElement, ExtendedFieldElement)
+ * @see #FieldVector3D(RealFieldElement, RealFieldElement, RealFieldElement)
*/
public T getX() {
return x;
@@ -310,7 +310,7 @@ public class FieldVector3D<T extends Ext
/** Get the ordinate of the vector.
* @return ordinate of the vector
- * @see #FieldVector3D(ExtendedFieldElement, ExtendedFieldElement, ExtendedFieldElement)
+ * @see #FieldVector3D(RealFieldElement, RealFieldElement, RealFieldElement)
*/
public T getY() {
return y;
@@ -318,7 +318,7 @@ public class FieldVector3D<T extends Ext
/** Get the height of the vector.
* @return height of the vector
- * @see #FieldVector3D(ExtendedFieldElement, ExtendedFieldElement, ExtendedFieldElement)
+ * @see #FieldVector3D(RealFieldElement, RealFieldElement, RealFieldElement)
*/
public T getZ() {
return z;
@@ -326,7 +326,7 @@ public class FieldVector3D<T extends Ext
/** Get the vector coordinates as a dimension 3 array.
* @return vector coordinates
- * @see #FieldVector3D(ExtendedFieldElement[])
+ * @see #FieldVector3D(RealFieldElement[])
*/
public T[] toArray() {
final T[] array = MathArrays.buildArray(x.getField(), 3);
@@ -390,7 +390,7 @@ public class FieldVector3D<T extends Ext
/** Get the azimuth of the vector.
* @return azimuth (α) of the vector, between -π and +π
- * @see #FieldVector3D(ExtendedFieldElement, ExtendedFieldElement)
+ * @see #FieldVector3D(RealFieldElement, RealFieldElement)
*/
public T getAlpha() {
return y.atan2(x);
@@ -398,7 +398,7 @@ public class FieldVector3D<T extends Ext
/** Get the elevation of the vector.
* @return elevation (δ) of the vector, between -π/2 and +π/2
- * @see #FieldVector3D(ExtendedFieldElement, ExtendedFieldElement)
+ * @see #FieldVector3D(RealFieldElement, RealFieldElement)
*/
public T getDelta() {
return z.divide(getNorm()).asin();
@@ -575,7 +575,7 @@ public class FieldVector3D<T extends Ext
* @return angular separation between v1 and v2
* @exception MathArithmeticException if either vector has a null norm
*/
- public static <T extends ExtendedFieldElement<T>> T angle(final FieldVector3D<T> v1, final FieldVector3D<T> v2)
+ public static <T extends RealFieldElement<T>> T angle(final FieldVector3D<T> v1, final FieldVector3D<T> v2)
throws MathArithmeticException {
final T normProduct = v1.getNorm().multiply(v2.getNorm());
@@ -611,7 +611,7 @@ public class FieldVector3D<T extends Ext
* @return angular separation between v1 and v2
* @exception MathArithmeticException if either vector has a null norm
*/
- public static <T extends ExtendedFieldElement<T>> T angle(final FieldVector3D<T> v1, final Vector3D v2)
+ public static <T extends RealFieldElement<T>> T angle(final FieldVector3D<T> v1, final Vector3D v2)
throws MathArithmeticException {
final T normProduct = v1.getNorm().multiply(v2.getNorm());
@@ -647,7 +647,7 @@ public class FieldVector3D<T extends Ext
* @return angular separation between v1 and v2
* @exception MathArithmeticException if either vector has a null norm
*/
- public static <T extends ExtendedFieldElement<T>> T angle(final Vector3D v1, final FieldVector3D<T> v2)
+ public static <T extends RealFieldElement<T>> T angle(final Vector3D v1, final FieldVector3D<T> v2)
throws MathArithmeticException {
return angle(v2, v1);
}
@@ -697,7 +697,7 @@ public class FieldVector3D<T extends Ext
* Test for the equality of two 3D vectors.
* <p>
* If all coordinates of two 3D vectors are exactly the same, and none of their
- * {@link ExtendedFieldElement#getReal() real part} are <code>NaN</code>, the
+ * {@link RealFieldElement#getReal() real part} are <code>NaN</code>, the
* two 3D vectors are considered to be equal.
* </p>
* <p>
@@ -937,7 +937,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the dot product v1.v2
*/
- public static <T extends ExtendedFieldElement<T>> T dotProduct(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T dotProduct(final FieldVector3D<T> v1,
final FieldVector3D<T> v2) {
return v1.dotProduct(v2);
}
@@ -948,7 +948,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the dot product v1.v2
*/
- public static <T extends ExtendedFieldElement<T>> T dotProduct(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T dotProduct(final FieldVector3D<T> v1,
final Vector3D v2) {
return v1.dotProduct(v2);
}
@@ -959,7 +959,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the dot product v1.v2
*/
- public static <T extends ExtendedFieldElement<T>> T dotProduct(final Vector3D v1,
+ public static <T extends RealFieldElement<T>> T dotProduct(final Vector3D v1,
final FieldVector3D<T> v2) {
return v2.dotProduct(v1);
}
@@ -970,7 +970,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the cross product v1 ^ v2 as a new Vector
*/
- public static <T extends ExtendedFieldElement<T>> FieldVector3D<T> crossProduct(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> FieldVector3D<T> crossProduct(final FieldVector3D<T> v1,
final FieldVector3D<T> v2) {
return v1.crossProduct(v2);
}
@@ -981,7 +981,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the cross product v1 ^ v2 as a new Vector
*/
- public static <T extends ExtendedFieldElement<T>> FieldVector3D<T> crossProduct(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> FieldVector3D<T> crossProduct(final FieldVector3D<T> v1,
final Vector3D v2) {
return v1.crossProduct(v2);
}
@@ -992,7 +992,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the cross product v1 ^ v2 as a new Vector
*/
- public static <T extends ExtendedFieldElement<T>> FieldVector3D<T> crossProduct(final Vector3D v1,
+ public static <T extends RealFieldElement<T>> FieldVector3D<T> crossProduct(final Vector3D v1,
final FieldVector3D<T> v2) {
return new FieldVector3D<T>(v2.x.linearCombination(v1.getY(), v2.z, -v1.getZ(), v2.y),
v2.y.linearCombination(v1.getZ(), v2.x, -v1.getX(), v2.z),
@@ -1008,7 +1008,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>1</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distance1(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distance1(final FieldVector3D<T> v1,
final FieldVector3D<T> v2) {
return v1.distance1(v2);
}
@@ -1022,7 +1022,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>1</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distance1(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distance1(final FieldVector3D<T> v1,
final Vector3D v2) {
return v1.distance1(v2);
}
@@ -1036,7 +1036,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>1</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distance1(final Vector3D v1,
+ public static <T extends RealFieldElement<T>> T distance1(final Vector3D v1,
final FieldVector3D<T> v2) {
return v2.distance1(v1);
}
@@ -1050,7 +1050,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>2</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distance(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distance(final FieldVector3D<T> v1,
final FieldVector3D<T> v2) {
return v1.distance(v2);
}
@@ -1064,7 +1064,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>2</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distance(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distance(final FieldVector3D<T> v1,
final Vector3D v2) {
return v1.distance(v2);
}
@@ -1078,7 +1078,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>2</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distance(final Vector3D v1,
+ public static <T extends RealFieldElement<T>> T distance(final Vector3D v1,
final FieldVector3D<T> v2) {
return v2.distance(v1);
}
@@ -1092,7 +1092,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>∞</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distanceInf(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distanceInf(final FieldVector3D<T> v1,
final FieldVector3D<T> v2) {
return v1.distanceInf(v2);
}
@@ -1106,7 +1106,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>∞</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distanceInf(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distanceInf(final FieldVector3D<T> v1,
final Vector3D v2) {
return v1.distanceInf(v2);
}
@@ -1120,7 +1120,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the distance between v1 and v2 according to the L<sub>∞</sub> norm
*/
- public static <T extends ExtendedFieldElement<T>> T distanceInf(final Vector3D v1,
+ public static <T extends RealFieldElement<T>> T distanceInf(final Vector3D v1,
final FieldVector3D<T> v2) {
return v2.distanceInf(v1);
}
@@ -1134,7 +1134,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the square of the distance between v1 and v2
*/
- public static <T extends ExtendedFieldElement<T>> T distanceSq(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distanceSq(final FieldVector3D<T> v1,
final FieldVector3D<T> v2) {
return v1.distanceSq(v2);
}
@@ -1148,7 +1148,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the square of the distance between v1 and v2
*/
- public static <T extends ExtendedFieldElement<T>> T distanceSq(final FieldVector3D<T> v1,
+ public static <T extends RealFieldElement<T>> T distanceSq(final FieldVector3D<T> v1,
final Vector3D v2) {
return v1.distanceSq(v2);
}
@@ -1162,7 +1162,7 @@ public class FieldVector3D<T extends Ext
* @param <T> the type of the field elements
* @return the square of the distance between v1 and v2
*/
- public static <T extends ExtendedFieldElement<T>> T distanceSq(final Vector3D v1,
+ public static <T extends RealFieldElement<T>> T distanceSq(final Vector3D v1,
final FieldVector3D<T> v2) {
return v2.distanceSq(v1);
}
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Decimal64.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Decimal64.java?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Decimal64.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Decimal64.java Sun Mar 10 19:44:31 2013
@@ -16,20 +16,20 @@
*/
package org.apache.commons.math3.util;
-import org.apache.commons.math3.ExtendedFieldElement;
+import org.apache.commons.math3.RealFieldElement;
import org.apache.commons.math3.Field;
import org.apache.commons.math3.exception.DimensionMismatchException;
/**
* This class wraps a {@code double} value in an object. It is similar to the
* standard class {@link Double}, while also implementing the
- * {@link ExtendedFieldElement} interface.
+ * {@link RealFieldElement} interface.
*
* @since 3.1
* @version $Id$
*/
public class Decimal64 extends Number
- implements ExtendedFieldElement<Decimal64>, Comparable<Decimal64> {
+ implements RealFieldElement<Decimal64>, Comparable<Decimal64> {
/** The constant value of {@code 0d} as a {@code Decimal64}. */
public static final Decimal64 ZERO;
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ExtendedFieldElementAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ExtendedFieldElementAbstractTest.java?rev=1454903&r1=1454902&r2=1454903&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ExtendedFieldElementAbstractTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ExtendedFieldElementAbstractTest.java Sun Mar 10 19:44:31 2013
@@ -23,7 +23,7 @@ import org.apache.commons.math3.util.Mat
import org.junit.Assert;
import org.junit.Test;
-public abstract class ExtendedFieldElementAbstractTest<T extends ExtendedFieldElement<T>> {
+public abstract class ExtendedFieldElementAbstractTest<T extends RealFieldElement<T>> {
protected abstract T build(double x);