public void init(double[] arr,int r,int c) throws DMLRuntimeException {
  if (sparse)   throw new DMLRuntimeException("MatrixBlockDSM.init() can be invoked only on matrices with dense representation.");
  if (r * c > rlen * clen)   throw new DMLRuntimeException("MatrixBlockDSM.init() invoked with too large dimensions (" + r + ","+ c+ ") vs ("+ rlen+ ","+ clen+ ")");
  allocateDenseBlock();
  System.arraycopy(arr,0,denseBlock,0,arr.length);
  recomputeNonZeros();
}

public void init ( double [ ] arr , int r , int c ) throws DMLRuntimeException { if ( sparse ) throw new DMLRuntimeException ( "MatrixBlockDSM.init() can be invoked only on matrices with dense representation." ) ; if ( r * c > rlen * clen ) throw new DMLRuntimeException ( "MatrixBlockDSM.init() invoked with too large dimensions (" + r + "," + c + ") vs (" + rlen + "," + clen + ")" ) ; allocateDenseBlock ( ) ; System . arraycopy ( arr , 0 , denseBlock , 0 , arr . length ) ; recomputeNonZeros ( ) ; }
note : this method is designed only for dense representation .
