public void setDim ( int dim , int value ) { if ( value < 0 || value >= shape [ dim ] ) // check index here throw new ArrayIndexOutOfBoundsException ( ) ; if ( shape [ dim ] >= 0 ) //!vlen current [ dim ] = value ; }
set current element at dimension dim to v