// NewFilter creates a new filter.
432305
func NewFilter(includeRegex, excludeRegex string) (*Filter, error) {
	f := &Filter{}
	var err error
	if includeRegex != "" {
		f.inc, err = regexp.Compile(includeRegex)

		if err != nil {
			return nil, err
		}
	}
	if excludeRegex != "" {
		f.exc, err = regexp.Compile(excludeRegex)
		if err != nil {
			return nil, err
		}
	}

	return f, nil
}
512893
func NewFIFSRegistrarFilterer(address common.Address, filterer bind.ContractFilterer) (*FIFSRegistrarFilterer, error) {
	contract, err := bindFIFSRegistrar(address, nil, nil, filterer)
	if err != nil {
		return nil, err
	}
	return &FIFSRegistrarFilterer{contract: contract}, nil
}
170934
func NewFiltersAggregation() *FiltersAggregation {
	return &FiltersAggregation{
		unnamedFilters:  make([]Query, 0),
		namedFilters:    make(map[string]Query),
		subAggregations: make(map[string]Aggregation),
	}
}
307039
func newFilterNode(n, m node) node {
	return &filterNode{nodeType: nodeFilter, Input: n, Condition: m}
}
665702
func NewContainsFilter(binName string, indexCollectionType IndexCollectionType, value interface{}) *Filter {
	v := NewValue(value)
	return newFilter(binName, indexCollectionType, v.GetType(), v, v)
}
106562
func NewClientFilter(version string) *ClientFilter {
	if version == "1.0" || version == "1.1" || version == "2.0" {
		return &ClientFilter{Version: version}
	}
	panic("version must be 1.0, 1.1 or 2.0 in string format.")
}
551419
func NewBinaryConvertFilter() *BinaryConvertFilter {
	ret := &BinaryConvertFilter{
		make([]base.Attribute, 0),
		make([]base.FilteredAttribute, 0),
		make(map[base.Attribute]bool),
		make(map[base.Attribute]map[uint64]base.Attribute),
	}
	return ret
}
810717
func (s *ListTopicsDetectionJobsInput) SetFilter(v *TopicsDetectionJobFilter) *ListTopicsDetectionJobsInput {
	s.Filter = v
	return s
}
595827
func newFilter(log uint, k int) (f *filter) {
	if log < elemSize {
		panic(fmt.Sprintf("log must be at least %d", elemSize))
	}

	size := uint64(1 << log)
	bins := make([][]uint8, k)  //allocate one more bin
	binSize := size >> elemSize //size of each bin to have size bits
	for i := range bins {
		bins[i] = make([]uint8, binSize)
	}

	return &filter{
		Log:  log,
		Bins: bins,
		K:    k,
		Left: uint64(k) * (1 << (log - 1)),
	}
}
825067
func AddNewerFilter(q *ds.Query, t time.Time) *ds.Query {
	return q.Gt("Created", t.UTC()).Order("-Created")
}
746474
func (s *ListEntityRecognizersInput) SetFilter(v *EntityRecognizerFilter) *ListEntityRecognizersInput {
	s.Filter = v
	return s
}
596934
func New(nextHandler Handler, filterFuncs ...FilterFunc) *FilterHandler {
	return &FilterHandler{
		nextHandler: nextHandler,
		filterFuncs: filterFuncs,
	}
}
710734
func (f *Filters) AddFilter(key, op, value string) {
	filter := &filter{Key: key, Op: op, Val: value}
	f.f = append(f.f, filter)
}
29501
func (w *WebService) Filter(filter FilterFunction) *WebService {
	w.filters = append(w.filters, filter)
	return w
}
1222637
func Filters(values Values) func(*orm.Query) (*orm.Query, error) {
	return NewFilter(values).Filters
}
1107487
func (s *DescribeDimensionKeysInput) SetFilter(v map[string]*string) *DescribeDimensionKeysInput {
	s.Filter = v
	return s
}
139052
func AddFilter(name string, lvl level, writer LogWriter) {
	Global.AddFilter(name, lvl, writer)

}