static public int [ ] computeEffectiveShape ( List < DapDimension > dimset ) { if ( dimset == null || dimset . size ( ) == 0 ) return new int [ 0 ] ; int effectiverank = dimset . size ( ) ; int [ ] shape = new int [ effectiverank ] ; for ( int i = 0 ; i < effectiverank ; i ++ ) { shape [ i ] = ( int ) dimset . get ( i ) . getSize ( ) ; } return shape ; }
Compute the shape inferred from a set of slices . Effective means that any trailing vlen will be ignored .