Documentation
¶
Index ¶
- Variables
- func AreEqual[SetA, SetB CountableSetOf[Obj], Obj any](setA SetA, setB SetB) bool
- func ContainsAllOf[Obj any](set SetOf[Obj], objs ...Obj) bool
- func ContainsAllOfIter[Obj any](set SetOf[Obj], seq iter.Seq[Obj]) bool
- func ContainsAnyOf[Obj any](set SetOf[Obj], objs ...Obj) bool
- func ContainsAnyOfIter[Obj any](set SetOf[Obj], seq iter.Seq[Obj]) bool
- func IsEmpty[Obj any](set SetOf[Obj]) (empty bool, known bool)
- type Cardinal
- type CountableSetOf
- func CountableIntersectionOf[SetA, SetB CountableSetOf[Obj], Obj any](setA SetA, setB SetB) CountableSetOf[Obj]
- func CountableRelativeComplementOf[SetA, SetB CountableSetOf[Obj], Obj any](setA SetA, setB SetB) CountableSetOf[Obj]
- func CountableUnionOf[SetA, SetB CountableSetOf[Item], Item any](setA SetA, setB SetB) CountableSetOf[Item]
- type Modifiable
- type SetOf
- func ComplementOf[Set SetOf[Obj], Obj any](set Set) SetOf[Obj]
- func IntersectionOf[SetA, SetB SetOf[Obj], Obj any](setA SetA, setB SetB) SetOf[Obj]
- func RelativeComplementOf[SetA, SetB SetOf[Obj], Obj any](setA SetA, setB SetB) SetOf[Obj]
- func UnionOf[SetA, SetB SetOf[Item], Item any](setA SetA, setB SetB) SetOf[Item]
Constants ¶
This section is empty.
Variables ¶
var CardinalFromInt = core.CardinalFromInt
Functions ¶
func AreEqual ¶
func AreEqual[SetA, SetB CountableSetOf[Obj], Obj any](setA SetA, setB SetB) bool
AreEqual returns true if the specified sets contain the same objects.
func ContainsAllOf ¶ added in v0.5.0
ContainsAllOf returns true if set contains all of the specified objects.
func ContainsAllOfIter ¶ added in v0.6.0
ContainsAllOfIter return true if set contains all of the objects in seq.
func ContainsAnyOf ¶
ContainsAnyOf returns true if set contains any of the specified objects.
func ContainsAnyOfIter ¶ added in v0.6.0
ContainsAnyOfIter returns true if set contains any of the objects in seq.
Types ¶
type Cardinal ¶ added in v0.6.0
func CardinalityOf ¶
CardinalityOf returns the cardinality of the set if it can be determined.
Calling it on an infinite set might result in an infinite loop.
type CountableSetOf ¶
type CountableSetOf[Obj any] = core.CountableSetOf[Obj]
func CountableIntersectionOf ¶
func CountableIntersectionOf[SetA, SetB CountableSetOf[Obj], Obj any](setA SetA, setB SetB) CountableSetOf[Obj]
CountableIntersectionOf returns the intersection of the two specified countable sets.
func CountableRelativeComplementOf ¶
func CountableRelativeComplementOf[SetA, SetB CountableSetOf[Obj], Obj any](setA SetA, setB SetB) CountableSetOf[Obj]
CountableRelativeComplementOf returns the countable relative complement of set A in set B.
func CountableUnionOf ¶
func CountableUnionOf[SetA, SetB CountableSetOf[Item], Item any](setA SetA, setB SetB) CountableSetOf[Item]
CountableUnionOf returns the union of the two specified countable sets.
type Modifiable ¶ added in v0.2.0
type Modifiable[Obj any] = core.Modifiable[Obj]
type SetOf ¶
func ComplementOf ¶
ComplementOf returns the complement of the specified set.
func IntersectionOf ¶
IntersectionOf returns the intersection of the two specified sets.
func RelativeComplementOf ¶
RelativeComplementOf returns the relative complement of set A in set B.
This is also known as the set difference of B and A, denoted B \ A or B - A.