Removed setSubmatrix methods from RealMatrix, BigMatrix interfaces to preserve binary compatibility to 1.0 release.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@208875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2005-07-02 22:38:00 +00:00
parent 98b8a03a7c
commit d38e114e21
4 changed files with 3 additions and 60 deletions

View File

@ -145,34 +145,6 @@ public interface BigMatrix {
BigMatrix 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(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.

View File

@ -128,35 +128,6 @@ public interface RealMatrix {
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.

View File

@ -658,7 +658,7 @@ public final class BigMatrixImplTest extends TestCase {
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);

View File

@ -628,7 +628,7 @@ public final class RealMatrixImplTest extends TestCase {
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