(self, start: XValue[T], stop: XValue[T], step: XValueDiff[T])
return sequence
Compute a sequence of values of the function

        This is more efficient than [self.call(xval) for xval in range(start, stop, step)] because each self.call(..)
        takes O(log n) time due to the binary tree structure of self._breakpoints.  This method can compute the range
        of values in linear time in the range, which is significantly faster for large value ranges.

        :param start: lower bound of value sequence
        :param stop: upper bound of value sequence
        :param step: width between points in the sequence
        :returns: a SortedDict of the values of the function between start and stop, with the x-distance between
            each data-point equal to `step`; like normal "range" functions the right endpoint is not included
Compute a sequence of values of the function
Compute a sequence of values of the function
def values(self, start: XValue[T], stop: XValue[T], step: XValueDiff[T]) -> "SortedDict[XValue[T], float]":
        """ Compute a sequence of values of the function

        This is more efficient than [self.call(xval) for xval in range(start, stop, step)] because each self.call(..)
        takes O(log n) time due to the binary tree structure of self._breakpoints.  This method can compute the range
        of values in linear time in the range, which is significantly faster for large value ranges.

        :param start: lower bound of value sequence
        :param stop: upper bound of value sequence
        :param step: width between points in the sequence
        :returns: a SortedDict of the values of the function between start and stop, with the x-distance between
            each data-point equal to `step`; like normal "range" functions the right endpoint is not included
        """

        step = step or (stop - start)
        if len(self.breakpoints) == 0:
            num_values = int(math.ceil((stop - start) / step))
            return SortedDict([(start + step * i, self._initial_value) for i in range(num_values)])

        curr_xval = start
        curr_value = self.call(start)
        next_index, next_breakpoint, next_value = self._breakpoint_info(self.breakpoints.bisect(start))

        sequence = SortedDict()
        while curr_xval < stop:
            sequence[curr_xval] = curr_value

            next_xval = min(stop, curr_xval + step)
            while next_breakpoint and next_xval >= next_breakpoint:
                assert next_index is not None  # if next_breakpoint is set, next_index should also be set
                curr_value = next_value
                next_index, next_breakpoint, next_value = self._breakpoint_info(next_index + 1)
            curr_xval = next_xval

        return sequence
def values ( self , start : XValue [ T ] , stop : XValue [ T ] , step : XValueDiff [ T ] ) -> "SortedDict[XValue[T], float]" : step = step or ( stop - start ) if len ( self . breakpoints ) == 0 : num_values = int ( math . ceil ( ( stop - start ) / step ) ) return SortedDict ( [ ( start + step * i , self . _initial_value ) for i in range ( num_values ) ] ) curr_xval = start curr_value = self . call ( start ) next_index , next_breakpoint , next_value = self . _breakpoint_info ( self . breakpoints . bisect ( start ) ) sequence = SortedDict ( ) while curr_xval < stop : sequence [ curr_xval ] = curr_value next_xval = min ( stop , curr_xval + step ) while next_breakpoint and next_xval >= next_breakpoint : assert next_index is not None # if next_breakpoint is set, next_index should also be set curr_value = next_value next_index , next_breakpoint , next_value = self . _breakpoint_info ( next_index + 1 ) curr_xval = next_xval return sequence