You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/04/25 04:00:45 UTC
svn commit: r768448 - in
/commons/proper/math/trunk/src/java/org/apache/commons/math/linear:
FieldMatrixImpl.java FieldVectorImpl.java
Author: sebb
Date: Sat Apr 25 02:00:44 2009
New Revision: 768448
URL: http://svn.apache.org/viewvc?rev=768448&view=rev
Log:
Unnecessary casts
Modified:
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldMatrixImpl.java
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldVectorImpl.java
Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldMatrixImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldMatrixImpl.java?rev=768448&r1=768447&r2=768448&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldMatrixImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldMatrixImpl.java Sat Apr 25 02:00:44 2009
@@ -79,7 +79,7 @@
*/
public FieldMatrixImpl(final T[][] d)
throws IllegalArgumentException, NullPointerException {
- super((Field<T>) extractField(d));
+ super(extractField(d));
copyIn(d);
}
@@ -100,7 +100,7 @@
*/
public FieldMatrixImpl(final T[][] d, final boolean copyArray)
throws IllegalArgumentException, NullPointerException {
- super((Field<T>) extractField(d));
+ super(extractField(d));
if (copyArray) {
copyIn(d);
} else {
@@ -135,7 +135,7 @@
* @param v column vector holding data for new matrix
*/
public FieldMatrixImpl(final T[] v) {
- super((Field<T>) extractField(v));
+ super(extractField(v));
final int nRows = v.length;
data = buildArray(getField(), nRows, 1);
for (int row = 0; row < nRows; row++) {
Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldVectorImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldVectorImpl.java?rev=768448&r1=768447&r2=768448&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldVectorImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldVectorImpl.java Sat Apr 25 02:00:44 2009
@@ -24,7 +24,7 @@
import org.apache.commons.math.MathRuntimeException;
/**
- * This class implements the {@link FieldVector<T>} interface with a {@link FieldElement} array.
+ * This class implements the {@link FieldVector} interface with a {@link FieldElement} array.
* @param <T> the type of the field elements
* @version $Revision$ $Date$
* @since 2.0
@@ -53,9 +53,9 @@
* Build a 0-length vector.
* <p>Zero-length vectors may be used to initialized construction of vectors
* by data gathering. We start with zero-length and use either the {@link
- * #FieldVectorImpl(FieldVectorImpl<T>, FieldVectorImpl<T>)} constructor
- * or one of the <code>append</code> method ({@link #append(double)}, {@link
- * #append(T[])}, {@link #append(FieldVectorImpl<T>)}) to gather data
+ * #FieldVectorImpl(FieldVectorImpl, FieldVectorImpl)} constructor
+ * or one of the <code>append</code> methods ({@link #append(double)}, {@link
+ * #append(T[])}, {@link #append(FieldVectorImpl)}) to gather data
* into this vector.</p>
* @param field field to which the elements belong
*/
@@ -269,7 +269,7 @@
*/
public FieldVectorImpl<T> add(FieldVectorImpl<T> v)
throws IllegalArgumentException {
- return (FieldVectorImpl<T>) add((T[]) v.data);
+ return (FieldVectorImpl<T>) add(v.data);
}
/** {@inheritDoc} */
@@ -304,7 +304,7 @@
*/
public FieldVectorImpl<T> subtract(FieldVectorImpl<T> v)
throws IllegalArgumentException {
- return (FieldVectorImpl<T>) subtract((T[]) v.data);
+ return (FieldVectorImpl<T>) subtract(v.data);
}
/** {@inheritDoc} */