// NewMinSeverityFilter provides a filter that matches on alert when severity is greater than
// or equal to the minSev value.
773965
func NewMinSeverityFilter(minSev api.SeverityType) Filter {
	return &filter{filterType: minSeverityFilter, value: minSev}
}
964426
func NewBoolFilter() BoolFilter {
	f := BoolFilter{
		mustClauses:    make([]Filter, 0),
		shouldClauses:  make([]Filter, 0),
		mustNotClauses: make([]Filter, 0),
	}
	return f
}
890500
func NewCompareFilter(compareOp CompareType, comparatorObj Comparator) *CompareFilter {
	op := pb.CompareType(compareOp)
	obj, err := comparatorObj.ConstructPBComparator()
	if err != nil {
		panic(err)
	}
	return &CompareFilter{
		CompareOp:  &op,
		Comparator: obj,
	}
}
729478
func NewFilterBeforePredicate(d time.Duration) FilterPredicate {
	now := metav1.Now()
	before := metav1.NewTime(now.Time.Add(-1 * d))
	return func(item *corev1.ReplicationController) bool {
		return item.CreationTimestamp.Before(&before)
	}
}
1076485
func NewFilterQueueWithDefaults() *FilterQueue {
	return NewFilterQueue(
		DefaultQueueSeperation,
		DefaultMarkValue,
		DefaultQueueStart,
		DefaultNumberOfQueues,
		DefaultNumberOfQueues,
		DefaultQueueSize,
		DefaultQueueSize,
	)
}
324911
func (wc *WhisperClient) NewMessageFilter(ctx *Context, criteria *Criteria) (string, error) {
	return wc.client.NewMessageFilter(ctx.context, *criteria.criteria)
}
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
}
665702
func NewContainsFilter(binName string, indexCollectionType IndexCollectionType, value interface{}) *Filter {
	v := NewValue(value)
	return newFilter(binName, indexCollectionType, v.GetType(), v, v)
}
570867
func NewFilteringTokenFilter(spi FilteringTokenFilterSPI,
	version util.Version, in TokenStream) *FilteringTokenFilter {
	ans := &FilteringTokenFilter{
		spi:         spi,
		input:       in,
		TokenFilter: NewTokenFilter(in),
		version:     version,
		first:       true,
	}
	ans.posIncrAtt = ans.Attributes().Add("PositionIncrementAttribute").(PositionIncrementAttribute)
	ans.enablePositionIncrements = true
	return ans
}
1360588
func NewCountSpanFilter(minCount, maxCount int64) Filter {
	return &filter{filterType: countSpanFilter, value: []int64{minCount, maxCount}}
}
844269
func (s *AwsSecurityFindingFilters) SetSeverityNormalized(v []*NumberFilter) *AwsSecurityFindingFilters {
	s.SeverityNormalized = v
	return s
}
678956
func NewDefaultRestrictionManager(maxValueLength int) *DefaultRestrictionManager {
	if maxValueLength == 0 {
		maxValueLength = defaultMaxValueLength
	}
	return &DefaultRestrictionManager{
		defaultRestriction: &Restriction{keyAllowed: true, maxValueLength: maxValueLength},
	}
}
507301
func NewMissionClearAll(TARGET_SYSTEM uint8, TARGET_COMPONENT uint8) *MissionClearAll {
	m := MissionClearAll{}
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	return &m
}
451048
func (s *Stackdriver) newListMetricDescriptorsFilters() []string {
	if len(s.MetricTypePrefixInclude) == 0 {
		return nil
	}

	metricTypeFilters := make([]string, len(s.MetricTypePrefixInclude))
	for i, metricTypePrefix := range s.MetricTypePrefixInclude {
		metricTypeFilters[i] = fmt.Sprintf(`metric.type = starts_with(%q)`, metricTypePrefix)
	}
	return metricTypeFilters
}
99860
func NewFilter(dataType DataType, format TensorFormat, shape []int) (retVal *Filter, err error) {
	var internal C.cudnnFilterDescriptor_t
	if err = result(C.cudnnCreateFilterDescriptor(&internal)); err != nil {
		return nil, err
	}
	switch len(shape) {
	case 0, 1, 2, 3:
		return nil, errors.New("Cannot create filter with a shape < 4 dimensions")
	case 4:
		if err = result(C.cudnnSetFilter4dDescriptor(internal, dataType.C(), format.C(), C.int(shape[0]), C.int(shape[1]), C.int(shape[2]), C.int(shape[3]))); err != nil {
			return nil, err
		}
	default:
		filterDimA, filterDimAManaged := ints2CIntPtr(shape)
		defer returnManaged(filterDimAManaged)
		if err = result(C.cudnnSetFilterNdDescriptor(internal, dataType.C(), format.C(), C.int(len(shape)), filterDimA)); err != nil {
			return nil, err
		}
	}
	return &Filter{
		internal: internal,
		format:   format,
		shape:    shape,
	}, nil
}
377923
func NewInverseBloomFilter(capacity uint) *InverseBloomFilter {
	return &InverseBloomFilter{
		array:    make([]*[]byte, capacity),
		hashPool: &sync.Pool{New: func() interface{} { return fnv.New32() }},
		capacity: capacity,
	}
}
794168
func NewFilterDeleter(kv kvdb.Kvdb, options ...Option) (FilterDeleter, error) {
	return newManager(kv, options...)
}