// Reduce runs the Visvalingam reduction using the values of the Visvalingam.
421618
func (r VisvalingamReducer) Reduce(path *geo.Path) *geo.Path {
	return Visvalingam(path, r.Threshold, r.ToKeep)
}
998815
func (c cols2HandleSlice) Less(i, j int) bool {
	return c[i].start < c[j].start
}
49195
func (slice metricSlice) Less(i, j int) bool {
	if slice[i].Metric == slice[j].Metric {
		return renderLabels(slice[i].Labels) < renderLabels(slice[j].Labels)
	}
	return slice[i].Metric < slice[j].Metric
}
1056559
func (r *Sum) Reduce(input chan *Entry, output chan *Entry) {
	sum := make(map[string]float64)
	for entry := range input {
		for _, name := range r.Fields {
			val, err := entry.FloatField(name)
			if err == nil {
				sum[name] += val
			}
		}
	}
	entry := NewEmptyEntry()
	for name, val := range sum {
		entry.SetFloatField(name, val)
	}
	output <- entry
	close(output)
}
1196086
func (s *DouglasPeuckerSimplifier) Simplify(g orb.Geometry) orb.Geometry {
	return simplify(s, g)
}
469573
func Reduce(f func(a, b float32) float32, def float32, l ...float32) (retVal float32) {
	retVal = def
	if len(l) == 0 {
		return
	}

	for _, v := range l {
		retVal = f(retVal, v)
	}
	return
}
1214273
func (vr *vectorRenderer) Close() {
	vr.p = append(vr.p, fmt.Sprintf("Z"))
}
714445
func Flatten(obj interface{}, filter []string, primitiveOnly bool) map[string]string {
	flat := make(map[string]string)
	v := reflect.ValueOf(obj)
	if !v.IsValid() {
		return nil
	}

	flatten("", v, primitiveOnly, false, flat)
	for _, f := range filter {
		if _, ok := flat[f]; ok {
			delete(flat, f)
		}
	}
	return flat
}
157504
func (s *SelectStatement) Reduce(valuer Valuer) *SelectStatement {
	stmt := s.Clone()
	stmt.Condition = Reduce(stmt.Condition, valuer)
	for _, d := range stmt.Dimensions {
		d.Expr = Reduce(d.Expr, valuer)
	}

	for _, source := range stmt.Sources {
		switch source := source.(type) {
		case *SubQuery:
			source.Statement = source.Statement.Reduce(valuer)
		}
	}
	return stmt
}
1131237
func (ds DeletionSummarySlice) Reduce() DeletionSummary {
	var s DeletionSummary
	for i := range ds {
		s.Blocks += ds[i].Blocks
		s.Vins += ds[i].Vins
		s.Vouts += ds[i].Vouts
		s.Addresses += ds[i].Addresses
		s.Transactions += ds[i].Transactions
		s.Tickets += ds[i].Tickets
		s.Votes += ds[i].Votes
		s.Misses += ds[i].Misses
	}
	return s
}
934151
func (c *countDistinctAcc) Accumulate(v interface{}) (interface{}, error) {
	vs := fmt.Sprintf("%v", v)
	c.state[vs]++
	return int64(len(c.state)), nil
}
1239059
func (r DouglasPeuckerReducer) Reduce(path *geo.Path) *geo.Path {
	return DouglasPeucker(path, r.Threshold)
}
244002
func Reduce(rf Reducer, rs ...mesos.Resource) (r *mesos.Resource) {
	if rf == nil {
		panic("Reduce: reducer func may not be nil")
	}
	for i := range rs {
		r = rf(r, &rs[i])
	}
	return
}
459850
func (n *checkServiceNodeSorter) Less(i, j int) bool {
	return n.Vec[i] < n.Vec[j]
}
565028
func Truncate(s string, w int, tail string) string {
	return DefaultCondition.Truncate(s, w, tail)
}
1357786
func (n *datacenterSorter) Less(i, j int) bool {
	return n.Vec[i] < n.Vec[j]
}
260346
func (declarations DeclarationsByProperty) Less(i, j int) bool {
	return declarations[i].Property < declarations[j].Property
}