chapter6/

directory
v0.0.0-...-ec09f47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2020 License: MIT

Directories

Path Synopsis
Implement these additional methods: func (*IntSet) Len() int // return the number of elements func (*IntSet) Remove(x int) // remove x from the set func (*IntSet) Clear() // remove all elements from the set func (*IntSet) Copy() *IntSet // return a copy of the set
Implement these additional methods: func (*IntSet) Len() int // return the number of elements func (*IntSet) Remove(x int) // remove x from the set func (*IntSet) Clear() // remove all elements from the set func (*IntSet) Copy() *IntSet // return a copy of the set
Define a variadic (*IntSet).AddAll(...int) method that allows a list of values to be added, such as s.AddAll(1, 2, 3)
Define a variadic (*IntSet).AddAll(...int) method that allows a list of values to be added, such as s.AddAll(1, 2, 3)
(*IntSet).UnionWith computes the union of two sets unhsing |, the word-parallel bitwise OR operator.
(*IntSet).UnionWith computes the union of two sets unhsing |, the word-parallel bitwise OR operator.
Add a method Elemsx that returns a slice containein the elements of the set, suitable for itrating over with a range loop.
Add a method Elemsx that returns a slice containein the elements of the set, suitable for itrating over with a range loop.
The type of each word used by IntSet is uint64, but 64-bit airthmetic may be ineffictinetn on a 32-bit platform.
The type of each word used by IntSet is uint64, but 64-bit airthmetic may be ineffictinetn on a 32-bit platform.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL