// NewRangeScanner initializes a new range scanner.  It takes a `min` and a
// `max` key for specifying the range paramaters.
263
func (bk *Bucket) NewRangeScanner(min, max []byte) *RangeScanner {
	return &RangeScanner{bk.db, bk.Name, min, max}
}
685443
func (s *ObjectAttributeRange) SetRange(v *TypedAttributeValueRange) *ObjectAttributeRange {
	s.Range = v
	return s
}
236697
func (s *Scan) SetTimeRange(from time.Time, to time.Time) {
	if s.timeRange == nil {
		s.timeRange = &TimeRange{
			From: from,
			To:   to,
		}
	} else {
		s.timeRange.From = from
		s.timeRange.To = to
	}
}
140646
func (s *Set) Range(from, to interface{}) Iterator {
	return s.skiplist.Range(from, to)
}
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
}
152145
func (errorformat *Errorformat) NewScanner(r io.Reader) *Scanner {
	return &Scanner{
		Errorformat: errorformat,
		source:      bufio.NewScanner(r),
		qi:          &qfinfo{},
		mlpoped:     true,
	}
}
511078
func NewRangeFrom(from int) (*Range, error) {
	return (&rangeBuilder{}).from(from, nil).Range()
}
1066255
func (tr Ranges) AddRanges(other Ranges) Ranges {
	res := tr.clone()
	it := other.Iter()
	for it.Next() {
		res.addRangeInPlace(it.Value())
	}
	return res
}
550638
func newScanner(input string) *scanner {
	// Normalize newlines.
	input = strings.Replace(input, "\r\n", "\n", -1)
	return &scanner{
		input: input,
		row:   1,
		col:   1,
	}
}
1020112
func NewScannerString(s string) *Scanner {
	sc := Scanner{in: bufio.NewReader(strings.NewReader(s))}
	return &sc
}
673985
func (s *SkipList) Range(from, to interface{}) Iterator {
	start := s.getPath(s.header, nil, from)
	return &rangeIterator{
		iter: iter{
			current: &node{
				forward:  []*node{start},
				backward: start,
			},
			list: s,
		},
		upperLimit: to,
		lowerLimit: from,
	}
}
1066277
func NewScanner(r io.Reader) *Scanner {
	return &Scanner{dec: gob.NewDecoder(r)}
}
281873
func UIntRange(min, max uint) gopter.Gen {
	return UInt64Range(uint64(min), uint64(max)).
		Map(uint64ToUint).
		WithShrinker(UIntShrinker).
		SuchThat(func(v uint) bool {
			return v >= min && v <= max
		})
}
569119
func UInt8Range(min, max uint8) gopter.Gen {
	return UInt64Range(uint64(min), uint64(max)).
		Map(uint64To8).
		WithShrinker(UInt8Shrinker).
		SuchThat(func(v uint8) bool {
			return v >= min && v <= max
		})
}
178707
func NewRowRange(startRow, stopRow []byte, startRowInclusive, stopRowInclusive bool) *RowRange {
	return &RowRange{
		StartRow:          startRow,
		StartRowInclusive: proto.Bool(startRowInclusive),
		StopRow:           stopRow,
		StopRowInclusive:  proto.Bool(stopRowInclusive),
	}
}
588050
func (v *version) LimitRanges() LimitRangeInformer {
	return &limitRangeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
896089
func NewRanges(ranges ...Range) Ranges {
	var result Ranges
	for _, r := range ranges {
		result = result.AddRange(r)
	}
	return result
}