code: public static DMatrixRMaj minRows(DMatrixSparseCSC input , @Nullable DMatrixRMaj output , @Nullable IGrowArray gw) {
          if( output == null ) {
              output = new DMatrixRMaj(input.numRows,1);
          } else {
              output.reshape(input.numRows,1);
          }
          if( gw == null )
              gw = new IGrowArray(input.numRows);
          else {
              gw.reshape(input.numRows);
              Arrays.fill(gw.data,0,input.numRows,0);
          }
  
          Arrays.fill(output.data,0,input.numRows,Double.MAX_VALUE);
          Arrays.fill(gw.data,0,input.numRows,0);
  
          for (int col = 0; col < input.numCols; col++) {
              int idx0 = input.col_idx[col];
              int idx1 = input.col_idx[col + 1];
  
              for (int i = idx0; i < idx1; i++) {
                  int row = input.nz_rows[i];
                  double v = input.nz_values[i];
                  if( output.data[row] > v ) {
                      output.data[row] = v;
                  }
                  gw.data[row]++;
              }
          }
          for (int row = 0; row < input.numRows; row++) {
              // consider the zeros now if a row wasn't filled in all the way
              if( gw.data[row] != input.numCols ) {
                  if( output.data[row] > 0 ) {
                      output.data[row] = 0;
                  }
              }
          }
  
          return output;
      }
docs: <p>
  Computes the minimum of each row in the input matrix and returns the results in a vector:<br>
  <br>
  b<sub>j</sub> = min(i=1:n ; a<sub>ji</sub>)
  </p>
  
  @param input Input matrix
  @param output Optional storage for output. Reshaped into a column vector. Modified.
  @param gw work space
  @return Vector containing the minimum of each row