public void fill ( final double [ ] [ ] data , final int startRow , final int startCol ) { final int rows = data . length ; final int cols = data [ 0 ] . length ; verifyTrue ( startRow < rows && startRow < getRowCount ( ) , "illegal startRow: %s" , startRow ) ; verifyTrue ( startCol < cols && startCol < getColumnCount ( ) , "illegal startCol: %s" , startCol ) ; verifyTrue ( rows <= getRowCount ( ) , "too many rows in input: %s: max allowed = %s" , rows , getRowCount ( ) ) ; verifyTrue ( cols <= getColumnCount ( ) , "too many columns in input: %s: max allowed = %s" , cols , getColumnCount ( ) ) ; for ( int i = startRow ; i < rows ; i ++ ) { for ( int j = startCol ; j < cols ; j ++ ) { setDouble ( data [ i ] [ j ] , i , j ) ; } } }
Populate matrix with given data .