commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1390302 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear: AbstractRealMatrix.java Array2DRowRealMatrix.java BlockRealMatrix.java OpenMapRealMatrix.java
Date Wed, 26 Sep 2012 07:24:35 GMT
Author: celestin
Date: Wed Sep 26 07:24:35 2012
New Revision: 1390302

URL: http://svn.apache.org/viewvc?rev=1390302&view=rev
Log:
In AbstractRealMatrix, provided empty implementations to methods
  - createMatrix(int, int),
  - copy(),
  - getEntry(int, int),
  - setEntry(int, int).
This allows the use of the @Override tag in classes Array2DRowRealMatrix, BlockRealMatrix,
OpenMapRealMatrix with java 5.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java?rev=1390302&r1=1390301&r2=1390302&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java
Wed Sep 26 07:24:35 2012
@@ -957,4 +957,24 @@ public abstract class AbstractRealMatrix
         }
         return ret;
     }
+
+
+    /*
+     * Empty implementations of these methods are provided in order to allow for
+     * the use of the @Override tag with Java 1.5.
+     */
+
+    /** {@inheritDoc} */
+    public abstract RealMatrix createMatrix(int rowDimension, int columnDimension)
+        throws NotStrictlyPositiveException;
+
+    /** {@inheritDoc} */
+    public abstract RealMatrix copy();
+
+    /** {@inheritDoc} */
+    public abstract double getEntry(int row, int column)
+        throws OutOfRangeException;
+
+    /** {@inheritDoc} */
+    public abstract void setEntry(int row, int column, double value);
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java?rev=1390302&r1=1390301&r2=1390302&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java
Wed Sep 26 07:24:35 2012
@@ -138,6 +138,7 @@ public class Array2DRowRealMatrix extend
     }
 
     /** {@inheritDoc} */
+    @Override
     public RealMatrix createMatrix(final int rowDimension,
                                    final int columnDimension)
         throws NotStrictlyPositiveException {
@@ -145,6 +146,7 @@ public class Array2DRowRealMatrix extend
     }
 
     /** {@inheritDoc} */
+    @Override
     public RealMatrix copy() {
         return new Array2DRowRealMatrix(copyOut(), false);
     }
@@ -298,6 +300,7 @@ public class Array2DRowRealMatrix extend
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getEntry(final int row, final int column)
         throws OutOfRangeException {
         MatrixUtils.checkMatrixIndex(this, row, column);
@@ -305,6 +308,7 @@ public class Array2DRowRealMatrix extend
     }
 
     /** {@inheritDoc} */
+    @Override
     public void setEntry(final int row, final int column, final double value)
         throws OutOfRangeException {
         MatrixUtils.checkMatrixIndex(this, row, column);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java?rev=1390302&r1=1390301&r2=1390302&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java
Wed Sep 26 07:24:35 2012
@@ -266,11 +266,13 @@ public class BlockRealMatrix extends Abs
     }
 
     /** {@inheritDoc} */
+    @Override
     public BlockRealMatrix createMatrix(final int rowDimension, final int columnDimension)
{
         return new BlockRealMatrix(rowDimension, columnDimension);
     }
 
     /** {@inheritDoc} */
+    @Override
     public BlockRealMatrix copy() {
         // create an empty matrix
         BlockRealMatrix copied = new BlockRealMatrix(rows, columns);
@@ -1126,6 +1128,7 @@ public class BlockRealMatrix extends Abs
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getEntry(final int row, final int column) {
         MatrixUtils.checkMatrixIndex(this, row, column);
         final int iBlock = row / BLOCK_SIZE;
@@ -1136,6 +1139,7 @@ public class BlockRealMatrix extends Abs
     }
 
     /** {@inheritDoc} */
+    @Override
     public void setEntry(final int row, final int column, final double value) {
         MatrixUtils.checkMatrixIndex(this, row, column);
         final int iBlock = row / BLOCK_SIZE;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java?rev=1390302&r1=1390301&r2=1390302&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java
Wed Sep 26 07:24:35 2012
@@ -69,11 +69,13 @@ public class OpenMapRealMatrix extends A
     }
 
     /** {@inheritDoc} */
+    @Override
     public OpenMapRealMatrix copy() {
         return new OpenMapRealMatrix(this);
     }
 
     /** {@inheritDoc} */
+    @Override
     public OpenMapRealMatrix createMatrix(int rowDimension, int columnDimension) {
         return new OpenMapRealMatrix(rowDimension, columnDimension);
     }
@@ -209,6 +211,7 @@ public class OpenMapRealMatrix extends A
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getEntry(int row, int column) {
         MatrixUtils.checkRowIndex(this, row);
         MatrixUtils.checkColumnIndex(this, column);
@@ -222,6 +225,7 @@ public class OpenMapRealMatrix extends A
     }
 
     /** {@inheritDoc} */
+    @Override
     public void setEntry(int row, int column, double value) {
         MatrixUtils.checkRowIndex(this, row);
         MatrixUtils.checkColumnIndex(this, column);



Mime
View raw message