24
24
* Matrix element indexing is 0-based -- e.g., <code>getEntry(0, 0)</code>
25
25
* returns the element in the first row, first column of the matrix.</p>
27
* @version $Revision: 799906 $ $Date: 2009-08-01 15:01:59 -0400 (Sat, 01 Aug 2009) $
27
* @version $Revision: 811786 $ $Date: 2009-09-06 05:36:08 -0400 (Sun, 06 Sep 2009) $
29
29
public interface RealMatrix extends AnyMatrix {
98
98
* @throws IllegalArgumentException
99
99
* if rowDimension(this) != columnDimension(m)
101
public RealMatrix preMultiply(RealMatrix m) throws IllegalArgumentException;
101
RealMatrix preMultiply(RealMatrix m) throws IllegalArgumentException;
104
104
* Returns matrix entries as a two-dimensional array.
138
138
RealMatrix getSubMatrix(int startRow, int endRow, int startColumn, int endColumn)
139
139
throws MatrixIndexException;
142
142
* Gets a submatrix. Rows and columns are indicated
143
143
* counting from 0 to n-1.
167
167
void copySubMatrix(int startRow, int endRow, int startColumn, int endColumn,
168
168
double[][] destination)
169
169
throws MatrixIndexException, IllegalArgumentException;
172
172
* Copy a submatrix. Rows and columns are indicated
173
173
* counting from 0 to n-1.
182
182
void copySubMatrix(int[] selectedRows, int[] selectedColumns, double[][] destination)
183
183
throws MatrixIndexException, IllegalArgumentException;
186
186
* Replace the submatrix starting at <code>row, column</code> using data in
187
187
* the input <code>subMatrix</code> array. Indexes are 0-based.
190
190
* Starting with <pre>
195
* and <code>subMatrix = {{3, 4} {5,6}}</code>, invoking
195
* and <code>subMatrix = {{3, 4} {5,6}}</code>, invoking
196
196
* <code>setSubMatrix(subMatrix,1,1))</code> will result in <pre>
202
202
* @param subMatrix array containing the submatrix replacement data
203
203
* @param row row coordinate of the top, left element to be replaced
204
204
* @param column column coordinate of the top, left element to be replaced
205
* @throws MatrixIndexException if subMatrix does not fit into this
206
* matrix from element in (row, column)
205
* @throws MatrixIndexException if subMatrix does not fit into this
206
* matrix from element in (row, column)
207
207
* @throws IllegalArgumentException if <code>subMatrix</code> is not rectangular
208
208
* (not all rows have the same length) or empty
209
209
* @throws NullPointerException if <code>subMatrix</code> is null
212
void setSubMatrix(double[][] subMatrix, int row, int column)
212
void setSubMatrix(double[][] subMatrix, int row, int column)
213
213
throws MatrixIndexException;
221
221
* @throws MatrixIndexException if the specified row index is invalid
223
223
RealMatrix getRowMatrix(int row) throws MatrixIndexException;
226
226
* Sets the entries in row number <code>row</code>
227
227
* as a row matrix. Row indices start at 0.
236
236
void setRowMatrix(int row, RealMatrix matrix)
237
237
throws MatrixIndexException, InvalidMatrixException;
240
240
* Returns the entries in column number <code>column</code>
241
241
* as a column matrix. Column indices start at 0.
260
260
void setColumnMatrix(int column, RealMatrix matrix)
261
261
throws MatrixIndexException, InvalidMatrixException;
264
264
* Returns the entries in row number <code>row</code>
265
265
* as a vector. Row indices start at 0.
284
284
void setRowVector(int row, RealVector vector)
285
285
throws MatrixIndexException, InvalidMatrixException;
288
288
* Returns the entries in column number <code>column</code>
289
289
* as a vector. Column indices start at 0.
357
357
void setColumn(int column, double[] array)
358
358
throws MatrixIndexException, InvalidMatrixException;
361
361
* Returns the entry in the specified row and column.
363
* Row and column indices start at 0 and must satisfy
363
* Row and column indices start at 0 and must satisfy
365
365
* <li><code>0 <= row < rowDimension</code></li>
366
366
* <li><code> 0 <= column < columnDimension</code></li>
368
368
* otherwise a <code>MatrixIndexException</code> is thrown.</p>
370
370
* @param row row location of entry to be fetched
371
371
* @param column column location of entry to be fetched
372
372
* @return matrix entry in row,column
378
378
* Set the entry in the specified row and column.
380
* Row and column indices start at 0 and must satisfy
380
* Row and column indices start at 0 and must satisfy
382
382
* <li><code>0 <= row < rowDimension</code></li>
383
383
* <li><code> 0 <= column < columnDimension</code></li>
385
385
* otherwise a <code>MatrixIndexException</code> is thrown.</p>
387
387
* @param row row location of entry to be set
388
388
* @param column column location of entry to be set
389
389
* @param value matrix entry to be set in row,column
396
396
* Change an entry in the specified row and column.
398
* Row and column indices start at 0 and must satisfy
398
* Row and column indices start at 0 and must satisfy
400
400
* <li><code>0 <= row < rowDimension</code></li>
401
401
* <li><code> 0 <= column < columnDimension</code></li>
403
403
* otherwise a <code>MatrixIndexException</code> is thrown.</p>
405
405
* @param row row location of entry to be set
406
406
* @param column column location of entry to be set
407
407
* @param increment value to add to the current matrix entry in row,column
414
414
* Change an entry in the specified row and column.
416
* Row and column indices start at 0 and must satisfy
416
* Row and column indices start at 0 and must satisfy
418
418
* <li><code>0 <= row < rowDimension</code></li>
419
419
* <li><code> 0 <= column < columnDimension</code></li>
421
421
* otherwise a <code>MatrixIndexException</code> is thrown.</p>
423
423
* @param row row location of entry to be set
424
424
* @param column column location of entry to be set
425
425
* @param factor multiplication factor for the current matrix entry in row,column