// AroundLatLngEqual returns true if the two options are equal.
// In case of one option being nil, the value of the other must be nil as well
// or be set to the default value of this option.
513333
func AroundLatLngEqual(o1, o2 *AroundLatLngOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
495782
func (v Vector) GreaterEqual(b Vector) bool {
	comp := v.Compare(b)
	return comp == Greater || comp == Equal
}
828889
func (mat *MatMxN) ApproxEqual(m2 *MatMxN) bool {
	if mat == m2 {
		return true
	}
	if mat.m != m2.m || mat.n != m2.n {
		return false
	}

	for i, el := range mat.dat {
		if !FloatEqual(el, m2.dat[i]) {
			return false
		}
	}

	return true
}
381888
func PercentileComputationEqual(o1, o2 *PercentileComputationOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
576865
func (o *AroundPrecisionOption) Equal(o2 *AroundPrecisionOption) bool {
	if o2 == nil {
		return o.value == 1
	}
	return o.value == o2.value
}
653069
func IgnorePluralsEqual(o1, o2 *IgnorePluralsOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
229761
func Equal(g1, g2 Geometry) bool {
	if g1 == nil || g2 == nil {
		return g1 == g2
	}

	if g1.GeoJSONType() != g2.GeoJSONType() {
		return false
	}

	switch g1 := g1.(type) {
	case Point:
		return g1.Equal(g2.(Point))
	case MultiPoint:
		return g1.Equal(g2.(MultiPoint))
	case LineString:
		return g1.Equal(g2.(LineString))
	case MultiLineString:
		return g1.Equal(g2.(MultiLineString))
	case Ring:
		g2, ok := g2.(Ring)
		if !ok {
			return false
		}
		return g1.Equal(g2)
	case Polygon:
		g2, ok := g2.(Polygon)
		if !ok {
			return false
		}
		return g1.Equal(g2)
	case MultiPolygon:
		return g1.Equal(g2.(MultiPolygon))
	case Collection:
		return g1.Equal(g2.(Collection))
	case Bound:
		g2, ok := g2.(Bound)
		if !ok {
			return false
		}
		return g1.Equal(g2)
	}

	panic(fmt.Sprintf("geometry type not supported: %T", g1))
}
1036101
func (a *AggFuncDesc) Equal(ctx sessionctx.Context, other *AggFuncDesc) bool {
	if a.HasDistinct != other.HasDistinct {
		return false
	}
	return a.baseFuncDesc.equal(ctx, &other.baseFuncDesc)
}
1163791
func AllEqual(values ...string) bool {
	if len(values) < 2 {
		return true
	}
	compare := values[0]
	for _, v := range values[1:] {
		if v != compare {
			return false
		}
	}
	return true
}
1009629
func UrlEquals(tab *Tab, equalsUrl string) ConditionalFunc {
	return func(tab *Tab) bool {
		if url, err := tab.GetCurrentUrl(); err == nil && url == equalsUrl {
			return true
		}
		return false
	}
}
317700
func (vn *VecN) ApproxEqual(vn2 *VecN) bool {
	if vn == nil || vn2 == nil || len(vn.vec) != len(vn2.vec) {
		return false
	}

	for i, el := range vn.vec {
		if !FloatEqual(el, vn2.vec[i]) {
			return false
		}
	}

	return true
}
499616
func SelectEqual(v string) func(string) bool {
	return func(p string) bool {
		return v == p
	}
}
1363500
func (o *InsidePolygonOption) Equal(o2 *InsidePolygonOption) bool {
	if o2 == nil {
		return len(o.polygons) == 0 && len(o.coordinates) == 0
	}
	return reflect.DeepEqual(o, o2)
}
760023
func (m1 Mat4x2) ApproxEqual(m2 Mat4x2) bool {
	for i := range m1 {
		if !FloatEqual(m1[i], m2[i]) {
			return false
		}
	}
	return true
}
425631
func (s *set) IsEqual(t Interface) bool {
	// Force locking only if given set is threadsafe.
	if conv, ok := t.(*Set); ok {
		conv.l.RLock()
		defer conv.l.RUnlock()
	}

	// return false if they are no the same size
	if sameSize := len(s.m) == t.Size(); !sameSize {
		return false
	}

	equal := true
	t.Each(func(item interface{}) bool {
		_, equal = s.m[item]
		return equal // if false, Each() will end
	})

	return equal
}
1335806
func ValidUntilEqual(o1, o2 *ValidUntilOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
509302
func ExtractAroundLatLngViaIP(opts ...interface{}) *opt.AroundLatLngViaIPOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AroundLatLngViaIPOption); ok {
			return v
		}
	}
	return nil
}