Override default ``*range=`` handler to account for relative computation.
960620
def indxByRange(self, valu):
        '''
        
        '''

        if not isinstance(valu, (list, tuple)):
            raise s_exc.BadCmprValu(valu=valu, cmpr='*range=')

        if len(valu) != 2:
            raise s_exc.BadCmprValu(valu=valu, cmpr='*range=')

        tick, tock = self.getTickTock(valu)

        if tick > tock:
            # User input has requested a nullset
            return ()

        return self._indxTimeRange(tick, tock)
1138449
def speckleRange(self, value):
        """"""
        if value >= 0:
            self._speckle_range = value
        else:
            raise InvalidSpeckleRangeError("Speckle range cannot be negative.")
        self._replace_bm()
1297417
def get_range(self, start=None, stop=None):
		
		return self.from_iterable(self.ranges(start, stop))
1182422
function isInRange(node, reference) {
    const or = node.range;
    const ir = reference.identifier.range;

    return or[0] <= ir[0] && ir[1] <= or[1];
}
729450
def calculateRange(self, values):
        
        self.reset()
        self._values = list(set(values))
        self._values.sort(key=lambda x: values.index(x))
1358061
def from_range(cls, data, name=None, dtype=None, **kwargs):
        
        if not isinstance(data, range):
            raise TypeError(
                '{0}(...) must be called with object coercible to a '
                'range, {1} was passed'.format(cls.__name__, repr(data)))

        start, stop, step = data.start, data.stop, data.step
        return RangeIndex(start, stop, step, dtype=dtype, name=name, **kwargs)
135121
def minValue(self, value):
        """"""
        if isinstance(value, [int, float, long]):
            self._rangeMin = value
777402
def _ctorCmprRange(self, vals):
        '''
        
        '''

        if not isinstance(vals, (list, tuple)):
            raise s_exc.BadCmprValu(valu=vals, cmpr='*range=')

        if len(vals) != 2:
            raise s_exc.BadCmprValu(valu=vals, cmpr='*range=')

        tick, tock = self.getTickTock(vals)

        if tick > tock:
            # User input has requested a nullset
            def cmpr(valu):
                return False

            return cmpr

        def cmpr(valu):
            return tick <= valu <= tock

        return cmpr
914823
function RANGE(from, to) {
        if (null == from || 1 != from.length || null == to || 1 != to.length) {
            throw 'Invalid args for RANGE';
        }

        return function (buffer, index, depth) {
            if (typeof depth === "undefined") { depth = 0; }
            var r;
            if (index < buffer.length && buffer.charAt(index) >= from && buffer.charAt(index) <= to) {
                return R.ok(paka.P.RANGE, index, 1, null);
            } else {
                r = R.error(paka.P.RANGE, index, null, 'Expects number in range [' + from + ', ' + to + ']');
                _update_last_error(r);
                return r;
            }
        };
    }
1310591
public static float Clamp(float x, FloatRange range) {
        return Clamp(x, range.getMin(), range.getMax());
    }
87450
function adjustRange(w, bisect) {
  var r0 = w.i0,
      r1 = w.i1 - 1,
      c = w.compare,
      d = w.data,
      n = d.length - 1;

  if (r0 > 0 && !c(d[r0], d[r0-1])) w.i0 = bisect.left(d, d[r0]);
  if (r1 < n && !c(d[r1], d[r1+1])) w.i1 = bisect.right(d, d[r1]);
}
1297675
def handle_relative(self, event):
        """"""
        delta_x, delta_y, delta_z = self._get_deltas(event)
        if delta_x:
            self.events.append(
                self.emulate_rel(0x00,
                                 delta_x,
                                 self.timeval))
        if delta_y:
            self.events.append(
                self.emulate_rel(0x01,
                                 delta_y,
                                 self.timeval))
        if delta_z:
            self.events.append(
                self.emulate_rel(0x02,
                                 delta_z,
                                 self.timeval))
1276554
def _update_range(self, data, **kwargs):
        
        self._client.update_range(data=data, **kwargs)
117137
function _SubRange(low, high) {
    this.low = low;
    this.high = high;
    this.length = 1 + high - low;
}
25405
def _xxrange(self, start, end, step_count):
        """"""
        _step = (end - start) / float(step_count)
        return (start + (i * _step) for i in xrange(int(step_count)))
1112997
def datetime_range(start_dt, end_dt, unit,
                   n_units=1, inclusive_end=False):
    """"""

    def done(a, b, inclusive_end):
        if inclusive_end:
            return a <= b
        else:
            return a < b

    current = start_dt
    while done(current, end_dt, inclusive_end):
        yield current
        current += datetime.timedelta(**{unit: n_units})
1372635
function calculateRange(range) {
        range = range || pageLoadRange;
        var currentIndex = layoutState.page - 1,
            low = currentIndex - range,
            high = currentIndex + range;
        return util.constrainRange(low, high, numPages - 1);
    }