// NewRangeFrom creates a new range with only the lower bound
511078
func NewRangeFrom(from int) (*Range, error) {
	return (&rangeBuilder{}).from(from, nil).Range()
}
588050
func (v *version) LimitRanges() LimitRangeInformer {
	return &limitRangeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
100482
func NewAllocator(ipr *IPRange) *IPRangeAllocator {
	a := &IPRangeAllocator{
		ipRange:     ipr,
		reserved:    make(map[int64]bool),
		startIsIPv4: bytes.Compare(ipr.Start.To16()[0:12], ipv6in4) == 0,
	}

	// calculate the size of the range
	a.startBig = big.NewInt(0)
	a.startBig.SetBytes(a.ipRange.Start)
	endBig := big.NewInt(0)
	endBig.SetBytes(a.ipRange.End)
	sizeBig := endBig.Sub(endBig, a.startBig)

	// 1 is added to the size because the end IP is inclusive
	a.size = sizeBig.Int64() + 1
	a.remaining = a.size

	return a
}
1004239
func (f *DateFacet) AddRange(name string, start, end string) *DateFacet {
	f.data.DateRanges = append(f.data.DateRanges, dateFacetRange{
		Name:  name,
		Start: start,
		End:   end,
	})
	return f
}
136551
func (ss *SortedSlice) RangeLessThan(e Sortable) (int, int) {
	i := ss.searchLessThan(&e, 0, len(ss.s)-1)
	return i, len(ss.s) - 1
}
860850
func range_(thread *Thread, fn *Builtin, args Tuple, kwargs []Tuple) (Value, error) {
	var start, stop, step int
	step = 1
	if err := UnpackPositionalArgs("range", args, kwargs, 1, &start, &stop, &step); err != nil {
		return nil, err
	}

	// TODO(adonovan): analyze overflow/underflows cases for 32-bit implementations.

	var n int
	switch len(args) {
	case 1:
		// range(stop)
		start, stop = 0, start
		fallthrough
	case 2:
		// range(start, stop)
		if stop > start {
			n = stop - start
		}
	case 3:
		// range(start, stop, step)
		switch {
		case step > 0:
			if stop > start {
				n = (stop-1-start)/step + 1
			}
		case step < 0:
			if start > stop {
				n = (start-1-stop)/-step + 1
			}
		default:
			return nil, fmt.Errorf("range: step argument must not be zero")
		}
	}

	return rangeValue{start: start, stop: stop, step: step, len: n}, nil
}
737762
func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
	s.Range = &v
	return s
}
22038
func newRunContainer16Range(rangestart uint16, rangelast uint16) *runContainer16 {
	rc := &runContainer16{}
	rc.iv = append(rc.iv, newInterval16Range(rangestart, rangelast))
	return rc
}
828860
func (s *TypedLinkAttributeRange) SetRange(v *TypedAttributeValueRange) *TypedLinkAttributeRange {
	s.Range = v
	return s
}
1340774
func NewFromSnapshot(snap *api.RangeAllocation) (*Range, error) {
	_, ipnet, err := net.ParseCIDR(snap.Range)
	if err != nil {
		return nil, err
	}
	r := NewCIDRRange(ipnet)
	if err := r.Restore(ipnet, snap.Data); err != nil {
		return nil, err
	}
	return r, nil
}
666823
func RangeField(name string, min, max, step int) *Field {
	ret := FieldWithType(name, formcommon.RANGE)
	ret.SetParam("min", fmt.Sprintf("%d", min))
	ret.SetParam("max", fmt.Sprintf("%d", max))
	ret.SetParam("step", fmt.Sprintf("%d", step))
	return ret
}
14799
func FullRange() []*Range {
	return []*Range{{LowVal: []types.Datum{{}}, HighVal: []types.Datum{types.MaxValueDatum()}}}
}
1347142
func (runtime *_runtime) newBoundFunction(target *_object, this Value, argumentList []Value) *_object {
	self := runtime.newBoundFunctionObject(target, this, argumentList)
	self.prototype = runtime.global.FunctionPrototype
	prototype := runtime.newObject()
	self.defineProperty("prototype", toValue_object(prototype), 0100, false)
	prototype.defineProperty("constructor", toValue_object(self), 0100, false)
	return self
}
75190
func (s *Scan) SetTimeRangeFrom(from time.Time) {
	s.SetTimeRange(from, maxTimestamp)
}
334544
func NewTermRangeQuery(term string) *TermRangeQuery {
	q := &TermRangeQuery{newFtsQueryBase()}
	q.options["term"] = term
	return q
}
1267411
func InRangeInt(value, left, right interface{}) bool {
	value64, _ := ToInt(value)
	left64, _ := ToInt(left)
	right64, _ := ToInt(right)
	if left64 > right64 {
		left64, right64 = right64, left64
	}
	return value64 >= left64 && value64 <= right64
}
1105347
func (p *propDistantFrom) AddDistantFrom(id int64) {
	p.DistantFrom = append(p.DistantFrom, id)
}