Пример #1
0
 @Override
 public ObjectMatrix<R, C, double[]> subset(int startRow, int startCol, int numRow, int numCol) {
   int endRow = startRow + numRow - 1;
   super.checkRowRange(startRow, endRow);
   int endCol = startCol + numCol - 1;
   super.checkColRange(startCol, endCol);
   ObjectMatrix<R, C, double[]> result =
       new CompressedBitMatrix<R, C>(numRow, numCol, this.totalBitsPerItem);
   int r = 0;
   for (int i = startRow; i < endRow; i++) {
     int c = 0;
     for (int j = startCol; j < endCol; j++) {
       result.set(r, c++, this.get(i, j));
     }
     r++;
   }
   /*
    * FIXME set up the row/column names.
    */
   return result;
 }