commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r208875 - in /jakarta/commons/proper/math/trunk/src: java/org/apache/commons/math/linear/ test/org/apache/commons/math/linear/
Date Sat, 02 Jul 2005 22:38:02 GMT
Author: psteitz
Date: Sat Jul  2 15:38:00 2005
New Revision: 208875

URL: http://svn.apache.org/viewcvs?rev=208875&view=rev
Log:
Removed setSubmatrix methods from RealMatrix, BigMatrix interfaces to preserve binary compatibility
to 1.0 release.

Modified:
    jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java
    jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrix.java
    jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
    jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java

Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java?rev=208875&r1=208874&r2=208875&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java
(original)
+++ jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java
Sat Jul  2 15:38:00 2005
@@ -146,34 +146,6 @@
     throws MatrixIndexException;
     
     /**
-     * Replace the submatrix starting at <code>row, column</code> using data
in
-     * the input <code>subMatrix</code> array. Indexes are 0-based.
-     * <p> 
-     * Example:<br>
-     * Starting with <pre>
-     * 1  2  3  4
-     * 5  6  7  8
-     * 9  0  1  2
-     * </pre>
-     * and <code>subMatrix = {{3, 4} {5,6}}</code>, invoking 
-     * <code>setSubMatrix(subMatrix,1,1))</code> will result in <pre>
-     * 1  2  3  4
-     * 5  3  4  8
-     * 9  5  6  2
-     * </pre>
-     * 
-     * @param subMatrix  array containing the submatrix replacement data
-     * @param row  row coordinate of the top, left element to be replaced
-     * @param column  column coordinate of the top, left element to be replaced
-     * @throws MatrixIndexException  if subMatrix does not fit into this 
-     *    matrix from element in (row, column) 
-     * @throws IllegalArgumentException if <code>subMatrix</code> is not rectangular
-     *  (not all rows have the same length) or empty
-     * @throws NullPointerException if <code>subMatrix</code> is null
-     */
-    public void setSubMatrix(BigDecimal subMatrix[][], int row, int column) throws MatrixIndexException;
-    
-    /**
      * Returns the entries in row number <code>row</code>
      * as a row matrix.  Row indices start at 0.
      *

Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrix.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrix.java?rev=208875&r1=208874&r2=208875&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrix.java
(original)
+++ jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrix.java
Sat Jul  2 15:38:00 2005
@@ -128,35 +128,6 @@
    RealMatrix getSubMatrix(int[] selectedRows, int[] selectedColumns)
    throws MatrixIndexException;
    
-    /**
-     * Replace the submatrix starting at <code>row, column</code> using data
in
-     * the input <code>subMatrix</code> array. Indexes are 0-based.
-     * <p> 
-     * Example:<br>
-     * Starting with <pre>
-     * 1  2  3  4
-     * 5  6  7  8
-     * 9  0  1  2
-     * </pre>
-     * and <code>subMatrix = {{3, 4} {5,6}}</code>, invoking 
-     * <code>setSubMatrix(subMatrix,1,1))</code> will result in <pre>
-     * 1  2  3  4
-     * 5  3  4  8
-     * 9  5  6  2
-     * </pre>
-     * 
-     * @param subMatrix  array containing the submatrix replacement data
-     * @param row  row coordinate of the top, left element to be replaced
-     * @param column  column coordinate of the top, left element to be replaced
-     * @throws MatrixIndexException  if subMatrix does not fit into this 
-     *    matrix from element in (row, column) 
-     * @throws IllegalArgumentException if <code>subMatrix</code> is not rectangular
-     *  (not all rows have the same length) or empty
-     * @throws NullPointerException if <code>subMatrix</code> is null
-     */
-    public void setSubMatrix(double subMatrix[][], int row, int column) throws MatrixIndexException;
-   
-   
    /**
     * Returns the entries in row number <code>row</code>
     * as a row matrix.  Row indices start at 0.

Modified: jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java?rev=208875&r1=208874&r2=208875&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
(original)
+++ jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
Sat Jul  2 15:38:00 2005
@@ -151,7 +151,7 @@
         assertEquals("testData2 row dimension",m2.getRowDimension(),2);
         assertEquals("testData2 column dimension",m2.getColumnDimension(),3);
         assertTrue("testData2 is not square",!m2.isSquare());
-    } 
+    }  
     
     /** test copy functions */
     public void testCopyFunctions() {
@@ -658,7 +658,7 @@
         assertEquals(expected, m);   
         
         // javadoc example
-        BigMatrix matrix = MatrixUtils.createBigMatrix
+        BigMatrixImpl matrix = (BigMatrixImpl) MatrixUtils.createBigMatrix
             (new double[][] {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 0, 1 , 2}});
         matrix.setSubMatrix(new BigDecimal[][] {{new BigDecimal(3),
             new BigDecimal(4)}, {new BigDecimal(5), new BigDecimal(6)}}, 1, 1);

Modified: jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java?rev=208875&r1=208874&r2=208875&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java
(original)
+++ jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java
Sat Jul  2 15:38:00 2005
@@ -628,7 +628,7 @@
         assertEquals(expected, m);   
         
         // javadoc example
-        RealMatrix matrix = MatrixUtils.createRealMatrix
+        RealMatrixImpl matrix = (RealMatrixImpl) MatrixUtils.createRealMatrix
             (new double[][] {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 0, 1 , 2}});
         matrix.setSubMatrix(new double[][] {{3, 4}, {5, 6}}, 1, 1);
         expected = MatrixUtils.createRealMatrix



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message