Remove deprecated methods in linear package.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6ac547dd
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6ac547dd
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6ac547dd

Branch: refs/heads/master
Commit: 6ac547ddcb1ccabb3dc6e8e3f25dd75fb87fd083
Parents: e92a76b
Author: Thomas Neidhart <thomas.neidh...@gmail.com>
Authored: Mon Feb 23 23:28:37 2015 +0100
Committer: Thomas Neidhart <thomas.neidh...@gmail.com>
Committed: Mon Feb 23 23:28:37 2015 +0100

----------------------------------------------------------------------
 .../math4/linear/AbstractFieldMatrix.java       | 35 --------------
 .../commons/math4/linear/ArrayFieldVector.java  | 50 --------------------
 .../commons/math4/linear/FieldVector.java       |  8 ----
 .../commons/math4/linear/OpenMapRealVector.java | 23 ---------
 .../commons/math4/linear/SparseFieldVector.java | 10 ----
 5 files changed, 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/6ac547dd/src/main/java/org/apache/commons/math4/linear/AbstractFieldMatrix.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/commons/math4/linear/AbstractFieldMatrix.java 
b/src/main/java/org/apache/commons/math4/linear/AbstractFieldMatrix.java
index 39832fa..314456a 100644
--- a/src/main/java/org/apache/commons/math4/linear/AbstractFieldMatrix.java
+++ b/src/main/java/org/apache/commons/math4/linear/AbstractFieldMatrix.java
@@ -123,41 +123,6 @@ public abstract class AbstractFieldMatrix<T extends 
FieldElement<T>>
         return d[0].getField();
     }
 
-    /** Build an array of elements.
-     * <p>
-     * Complete arrays are filled with field.getZero()
-     * </p>
-     * @param <T> Type of the field elements
-     * @param field field to which array elements belong
-     * @param rows number of rows
-     * @param columns number of columns (may be negative to build partial
-     * arrays in the same way <code>new Field[rows][]</code> works)
-     * @return a new array
-     * @deprecated as of 3.2, replaced by {@link MathArrays#buildArray(Field, 
int, int)}
-     */
-    @Deprecated
-    protected static <T extends FieldElement<T>> T[][] buildArray(final 
Field<T> field,
-                                                                  final int 
rows,
-                                                                  final int 
columns) {
-        return MathArrays.buildArray(field, rows, columns);
-    }
-
-    /** Build an array of elements.
-     * <p>
-     * Arrays are filled with field.getZero()
-     * </p>
-     * @param <T> the type of the field elements
-     * @param field field to which array elements belong
-     * @param length of the array
-     * @return a new array
-     * @deprecated as of 3.2, replaced by {@link MathArrays#buildArray(Field, 
int)}
-     */
-    @Deprecated
-    protected static <T extends FieldElement<T>> T[] buildArray(final Field<T> 
field,
-                                                                final int 
length) {
-        return MathArrays.buildArray(field, length);
-    }
-
     /** {@inheritDoc} */
     public Field<T> getField() {
         return field;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6ac547dd/src/main/java/org/apache/commons/math4/linear/ArrayFieldVector.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/commons/math4/linear/ArrayFieldVector.java 
b/src/main/java/org/apache/commons/math4/linear/ArrayFieldVector.java
index b994bc5..1378234 100644
--- a/src/main/java/org/apache/commons/math4/linear/ArrayFieldVector.java
+++ b/src/main/java/org/apache/commons/math4/linear/ArrayFieldVector.java
@@ -269,21 +269,6 @@ public class ArrayFieldVector<T extends FieldElement<T>> 
implements FieldVector<
      * @param v2 Second vector (will be put at back of the new vector).
      * @throws NullArgumentException if {@code v1} or {@code v2} is
      * {@code null}.
-     * @deprecated as of 3.2, replaced by {@link 
#ArrayFieldVector(FieldVector, FieldVector)}
-     */
-    @Deprecated
-    public ArrayFieldVector(ArrayFieldVector<T> v1, ArrayFieldVector<T> v2)
-            throws NullArgumentException {
-        this((FieldVector<T>) v1, (FieldVector<T>) v2);
-    }
-
-    /**
-     * Construct a vector by appending one vector to another vector.
-     *
-     * @param v1 First vector (will be put in front of the new vector).
-     * @param v2 Second vector (will be put at back of the new vector).
-     * @throws NullArgumentException if {@code v1} or {@code v2} is
-     * {@code null}.
      * @since 3.2
      */
     public ArrayFieldVector(FieldVector<T> v1, FieldVector<T> v2)
@@ -307,21 +292,6 @@ public class ArrayFieldVector<T extends FieldElement<T>> 
implements FieldVector<
      * @param v2 Second vector (will be put at back of the new vector).
      * @throws NullArgumentException if {@code v1} or {@code v2} is
      * {@code null}.
-     * @deprecated as of 3.2, replaced by {@link 
#ArrayFieldVector(FieldVector, FieldElement[])}
-     */
-    @Deprecated
-    public ArrayFieldVector(ArrayFieldVector<T> v1, T[] v2)
-            throws NullArgumentException {
-        this((FieldVector<T>) v1, v2);
-    }
-
-    /**
-     * Construct a vector by appending one vector to another vector.
-     *
-     * @param v1 First vector (will be put in front of the new vector).
-     * @param v2 Second vector (will be put at back of the new vector).
-     * @throws NullArgumentException if {@code v1} or {@code v2} is
-     * {@code null}.
      * @since 3.2
      */
     public ArrayFieldVector(FieldVector<T> v1, T[] v2)
@@ -343,21 +313,6 @@ public class ArrayFieldVector<T extends FieldElement<T>> 
implements FieldVector<
      * @param v2 Second vector (will be put at back of the new vector).
      * @throws NullArgumentException if {@code v1} or {@code v2} is
      * {@code null}.
-     * @deprecated as of 3.2, replaced by {@link 
#ArrayFieldVector(FieldElement[], FieldVector)}
-     */
-    @Deprecated
-    public ArrayFieldVector(T[] v1, ArrayFieldVector<T> v2)
-            throws NullArgumentException {
-        this(v1, (FieldVector<T>) v2);
-    }
-
-    /**
-     * Construct a vector by appending one vector to another vector.
-     *
-     * @param v1 First vector (will be put in front of the new vector).
-     * @param v2 Second vector (will be put at back of the new vector).
-     * @throws NullArgumentException if {@code v1} or {@code v2} is
-     * {@code null}.
      * @since 3.2
      */
     public ArrayFieldVector(T[] v1, FieldVector<T> v2)
@@ -670,11 +625,6 @@ public class ArrayFieldVector<T extends FieldElement<T>> 
implements FieldVector<
         return new ArrayFieldVector<T>(field, out, false);
     }
 
-    /** {@inheritDoc} */
-    public T[] getData() {
-        return data.clone();
-    }
-
     /**
      * Returns a reference to the underlying data array.
      * <p>Does not make a fresh copy of the underlying data.</p>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6ac547dd/src/main/java/org/apache/commons/math4/linear/FieldVector.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/FieldVector.java 
b/src/main/java/org/apache/commons/math4/linear/FieldVector.java
index 1e74e55..2e4544b 100644
--- a/src/main/java/org/apache/commons/math4/linear/FieldVector.java
+++ b/src/main/java/org/apache/commons/math4/linear/FieldVector.java
@@ -191,14 +191,6 @@ public interface FieldVector<T extends FieldElement<T>>  {
         throws DimensionMismatchException, MathArithmeticException;
 
     /**
-     * Returns vector entries as a T array.
-     * @return T array of entries
-     * @deprecated as of 3.1, to be removed in 4.0. Please use the {@link 
#toArray()} method instead.
-     */
-    @Deprecated
-    T[] getData();
-
-    /**
      * Compute the dot product.
      * @param v vector with which dot product should be computed
      * @return the scalar dot product of {@code this} and {@code v}

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6ac547dd/src/main/java/org/apache/commons/math4/linear/OpenMapRealVector.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/commons/math4/linear/OpenMapRealVector.java 
b/src/main/java/org/apache/commons/math4/linear/OpenMapRealVector.java
index 4619835..6928b93 100644
--- a/src/main/java/org/apache/commons/math4/linear/OpenMapRealVector.java
+++ b/src/main/java/org/apache/commons/math4/linear/OpenMapRealVector.java
@@ -314,29 +314,6 @@ public class OpenMapRealVector extends SparseRealVector
         return new OpenMapRealVector(this);
     }
 
-    /**
-     * Computes the dot product.
-     * Note that the computation is now performed in the parent class: no
-     * performance improvement is to be expected from this overloaded
-     * method.
-     * The previous implementation was buggy and cannot be easily fixed
-     * (see MATH-795).
-     *
-     * @param v Vector.
-     * @return the dot product of this vector with {@code v}.
-     * @throws DimensionMismatchException if {@code v} is not the same size as
-     * {@code this} vector.
-     *
-     * @deprecated as of 3.1 (to be removed in 4.0). The computation is
-     * performed by the parent class. The method must be kept to maintain
-     * backwards compatibility.
-     */
-    @Deprecated
-    public double dotProduct(OpenMapRealVector v)
-        throws DimensionMismatchException {
-        return dotProduct((RealVector) v);
-    }
-
     /** {@inheritDoc} */
     @Override
     public OpenMapRealVector ebeDivide(RealVector v)

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6ac547dd/src/main/java/org/apache/commons/math4/linear/SparseFieldVector.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/commons/math4/linear/SparseFieldVector.java 
b/src/main/java/org/apache/commons/math4/linear/SparseFieldVector.java
index 09bfb37..f95fdbe 100644
--- a/src/main/java/org/apache/commons/math4/linear/SparseFieldVector.java
+++ b/src/main/java/org/apache/commons/math4/linear/SparseFieldVector.java
@@ -255,16 +255,6 @@ public class SparseFieldVector<T extends FieldElement<T>> 
implements FieldVector
         return res;
     }
 
-    /**
-     * {@inheritDoc}
-     *
-     * @deprecated as of 3.1, to be removed in 4.0. Please use the {@link 
#toArray()} method instead.
-     */
-    @Deprecated
-    public T[] getData() {
-        return toArray();
-    }
-
     /** {@inheritDoc} */
     public int getDimension() {
         return virtualSize;

Reply via email to