Documentation
¶
Index ¶
- Variables
- func Difference(a ListSet, b, out Set)
- func Intersect(a ListSet, b, out Set)
- func Union(a, b ListSet, out Set)
- func XOR(a, b ListSet, out Set)
- type GoMap
- type Hash128
- type Hash64
- type HashSHA1
- type ListSet
- type MinimalAcyclicFSA
- type MutableSet
- type Quicktrie
- type Set
- type TchapPatricia
- type TernarySet
Constants ¶
This section is empty.
Variables ¶
var ( GoMapIsMutable MutableSet = NewGoMap(0) GoMapIsListable ListSet = NewGoMap(0) )
Guarantees the implementation of those interfaces
var ( QuicktrieIsMutable MutableSet = NewQuicktrie() QuicktrieIsListable ListSet = NewQuicktrie() )
Guarantees the implementation of those interfaces
Functions ¶
func Difference ¶
Difference between a and b. The result is stored in the out set. Everything that is in A but not in B will be the result.
func Intersect ¶
Intersect of the two list set, the result stored in the out set. Everything in both A and B is the result.
Types ¶
type GoMap ¶
type GoMap map[string]struct{}
GoMap is a set of string implemented using Go maps.
type Hash128 ¶
type Hash128 struct {
// contains filtered or unexported fields
}
Hash128 is a hash based set, using a 128 bits hasher.
func NewFarm128 ¶
NewFarm128 is a Hash128 with farmhash for hasher.
func NewHashFunc128 ¶
NewHashFunc128 creates a hash set using a hash128 hasher func.
func NewSpooky128 ¶
NewSpooky128 is a Hash128 with spooky hash for hasher.
type Hash64 ¶
type Hash64 struct {
// contains filtered or unexported fields
}
Hash64 is a hash based set, using a 64 bits hasher.
func NewHashFunc64 ¶
NewHashFunc64 creates a hash set using a hash64 hasher func.
func NewSpooky64 ¶
NewSpooky64 is a Hash64 with spooky hash for hasher.
type HashSHA1 ¶
type HashSHA1 struct {
// contains filtered or unexported fields
}
HashSHA1 is a hash based set, using SHA1 for hashing.
func NewHashSHA1 ¶
NewHashSHA1 creates a hash set using SHA1.
type MinimalAcyclicFSA ¶
type MinimalAcyclicFSA struct { }
type MutableSet ¶
MutableSet is a Set from which you can remove keys.
var (
HashSHA1IsMutable MutableSet = NewHashSHA1(0, true)
)
type Quicktrie ¶
type Quicktrie struct {
// contains filtered or unexported fields
}
Quicktrie is a set of string implemented using a sorted slice of strings.
type TchapPatricia ¶
type TchapPatricia struct {
// contains filtered or unexported fields
}
TchapPatricia is a set of string implemented using a sorted slice of strings.
func NewTchapPatricia ¶
func NewTchapPatricia() *TchapPatricia
NewTchapPatricia creates a TchapPatricia of capacity n.
func (TchapPatricia) Contains ¶
func (pat TchapPatricia) Contains(s string) bool
Contains tells if this key was in the set at least once.
func (*TchapPatricia) Delete ¶
func (pat *TchapPatricia) Delete(s string)
Delete the element form this set.
func (TchapPatricia) IsEmpty ¶
func (pat TchapPatricia) IsEmpty() bool
IsEmpty tells if this set is empty.
func (TchapPatricia) Keys ¶
func (pat TchapPatricia) Keys() (keys []string)
Keys gives all the keys in this TchapPatricia.
func (TchapPatricia) Len ¶
func (pat TchapPatricia) Len() (count int)
Len is the length of this set.
type TernarySet ¶
type TernarySet struct {
// contains filtered or unexported fields
}
TernarySet is a set specifically for string indexed keys.
func (*TernarySet) Contains ¶
func (t *TernarySet) Contains(key string) bool
Contains tells if key exists.
func (*TernarySet) DotGraph ¶
func (t *TernarySet) DotGraph(out io.Writer, name string)
DotGraph prints the trie in DOT format.
func (*TernarySet) IsEmpty ¶
func (t *TernarySet) IsEmpty() bool
IsEmpty tells if this set contains any elements.
func (*TernarySet) Keys ¶
func (t *TernarySet) Keys() []string
Keys returns all the keys known to this trie
func (*TernarySet) Len ¶
func (t *TernarySet) Len() int
Len returns the count of elements in this set.