dap4/d4core/src/main/java/dap4/core/util/Slice.java
static long
    MAP(Slice target, long i)
            throws DapException
    {
        if(i < 0)
            throw new DapException("Slice.compose: i must be >= 0");
        if(i > target.getStop())
            throw new DapException("i must be < stop");
        return target.getFirst() + i * target.getStride();
    }
static long
    MAP(Slice target, long i)
            throws DapException
    {
        if(i < 0)
            throw new DapException("Slice.compose: i must be >= 0");
        if(i > target.getStop())
            throw new DapException("i must be < stop");
        return target.getFirst() + i * target.getStride();
    }
static long MAP ( Slice target , long i ) throws DapException { if ( i < 0 ) throw new DapException ( "Slice.compose: i must be >= 0" ) ; if ( i > target . getStop ( ) ) throw new DapException ( "i must be < stop" ) ; return target . getFirst ( ) + i * target . getStride ( ) ; }
Map ith element of one range wrt a target range

@param target the target range
@param i      index of the element
@return the i-th element of a range
@throws DapException if index is invalid
Map ith element of one range wrt a target range