// Filter with op & value.
167428
func (p *aeDataQueryProperty) Filter(op string, value interface{}) *aeDataQueryBuilder {
	switch op {
	case "<=":
		p.LessThanOrEqual(value)
	case ">=":
		p.GreaterThanOrEqual(value)
	case "<":
		p.LessThan(value)
	case ">":
		p.GreaterThan(value)
	case "=":
		p.Equal(value)
	default:
		p.bldr.q = p.bldr.q.Filter(p.name+" "+op, value) // error raised by native query
	}
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, op, value)
	}
	return p.bldr
}
372647
func Filter(arr interface{}, predicate interface{}) interface{} {
	if !IsIteratee(arr) {
		panic("First parameter must be an iteratee")
	}

	if !IsFunction(predicate, 1, 1) {
		panic("Second argument must be function")
	}

	funcValue := reflect.ValueOf(predicate)

	funcType := funcValue.Type()

	if funcType.Out(0).Kind() != reflect.Bool {
		panic("Return argument should be a boolean")
	}

	arrValue := reflect.ValueOf(arr)

	arrType := arrValue.Type()

	// Get slice type corresponding to array type
	resultSliceType := reflect.SliceOf(arrType.Elem())

	// MakeSlice takes a slice kind type, and makes a slice.
	resultSlice := reflect.MakeSlice(resultSliceType, 0, 0)

	for i := 0; i < arrValue.Len(); i++ {
		elem := arrValue.Index(i)

		result := funcValue.Call([]reflect.Value{elem})[0].Interface().(bool)

		if result {
			resultSlice = reflect.Append(resultSlice, elem)
		}
	}

	return resultSlice.Interface()
}
420806
func (fn FilterFunc) Filter(rels []*rspb.Release) (rets []*rspb.Release) {
	for _, rel := range rels {
		if fn.Check(rel) {
			rets = append(rets, rel)
		}
	}
	return
}
491872
func (w *Watcher) FilterOps(ops ...Op) {
	w.mu.Lock()
	w.ops = make(map[Op]struct{})
	for _, op := range ops {
		w.ops[op] = struct{}{}
	}
	w.mu.Unlock()
}
1355373
func (r *Request) Filter(fn FilterRequestFunc) *Request {
	r.Filters = append(r.Filters, fn)
	return r
}
353941
func (f *Filter) Add(filter, value string) {
	f.v.Add(filter, value)
}
14171
func (f *imdctFilter) filter(input, output []float32, typ int) {
	copy(output, f[18:])

	if typ != 2 {
		imdct36(input, f[:])
		for t := 0; t < 36; t++ {
			f[t] *= mdctWindows[typ][t]
		}
	} else {
		var wInput [6]float32
		var wOutput [12]float32
		for t := 0; t < 36; t++ {
			f[t] = 0
		}
		for w := 0; w < 3; w++ {
			for f := 0; f < 6; f++ {
				wInput[f] = input[3*f+w]
			}
			imdct12(wInput[:], wOutput[:])
			for t := 0; t < 12; t++ {
				f[6+6*w+t] += mdctWindows[2][t] * wOutput[t]
			}
		}
	}

	for i := 0; i < 18; i++ {
		output[i] += f[i]
	}
}
1136838
func (s *TermvectorsService) Filter(filter *TermvectorsFilterSettings) *TermvectorsService {
	s.filter = filter
	return s
}
596161
func filterEqual(a, b []Filter) bool {
	if len(a) != len(b) {
		return false
	}
	for i := range a {
		if a[i].Field != b[i].Field {
			return false
		}
		if a[i].CompOp != b[i].CompOp {
			return false
		}
		if a[i].Value != b[i].Value {
			return false
		}
	}
	return true
}
1279734
func (s *Schema) Filter(field string, value interface{}) []Project {
	result := []Project{}
	for _, item := range s.Projects {
		v := reflect.ValueOf(item)
		for i := 0; i < v.NumField(); i++ {
			if v.Type().Field(i).Name == field {
				if reflect.DeepEqual(v.Field(i).Interface(), value) {
					result = append(result, item)
				}
			}
		}
	}
	return result
}
705934
func (list ErrorList) Filter(fns ...utilerrors.Matcher) ErrorList {
	err := utilerrors.FilterOut(list.ToAggregate(), fns...)
	if err == nil {
		return nil
	}
	// FilterOut takes an Aggregate and returns an Aggregate
	return fromAggregate(err.(utilerrors.Aggregate))
}
136317
func (r Result) Filter(fn func(*resource.Info) bool) Result {
	var result Result
	for _, i := range r {
		if fn(i) {
			result.Append(i)
		}
	}
	return result
}
436157
func (s strings) Filter(in []string, keep func(item string) bool) []string {
	var out []string
	for _, item := range in {
		if keep(item) {
			out = append(out, item)
		}
	}

	return out
}
1174054
func (s *Set) Filter(cb func(interface{}) bool) *Set {
	result := new(Set)

	for _, v := range s.m {
		if cb(v) {
			result.Add(v)
		}
	}

	return result
}
925524
func Filter(slice []string, handler func(string) bool) []string {
	filtered := []string{}
	for _, element := range slice {
		if handler(element) {
			filtered = append(filtered, element)
		}
	}
	return filtered
}
282181
func FilterS(f func(string) bool, sl []string) (result []string) {
	result = make([]string, 0)
	for i := range sl {
		if f(sl[i]) {
			result = append(result, sl[i])
		}
	}
	return result
}
55441
func (a *AliasAddAction) Filter(filter Query) *AliasAddAction {
	a.filter = filter
	return a
}