Documentation ¶
Index ¶
- Constants
- func Add16(x, y, carry uint16) (sum, carryOut uint16)
- func IsLeftBitSet(id uint64) bool
- func LastID(id tree.ID) tree.ID
- func NewID(id uint16, length uint8) tree.ID
- func ParseRange(s string) (tree.Range, error)
- func RangeFrom(from, to uint16) tree.Range
- func RangeOfID(id tree.ID) tree.Range
- func Sub16(x, y, borrow uint16) (diff, borrowOut uint16)
- type IDSet
- type IDSetBuilder
Constants ¶
View Source
const IDBitSize = uint8(16)
Variables ¶
This section is empty.
Functions ¶
func Add16 ¶
Add32 returns the sum with carry of x, y and carry: sum = x + y + carry. The carry input must be 0 or 1; otherwise the behavior is undefined. The carryOut output is guaranteed to be 0 or 1.
This function's execution time does not depend on the inputs.
func IsLeftBitSet ¶
func RangeOfID ¶
Range returns the inclusive range of IPs that p covers.
If p is zero or otherwise invalid, Range returns the zero value.
Types ¶
type IDSet ¶
type IDSet struct {
// contains filtered or unexported fields
}
type IDSetBuilder ¶
type IDSetBuilder struct {
// contains filtered or unexported fields
}
func (*IDSetBuilder) AddId ¶
func (s *IDSetBuilder) AddId(id tree.ID)
func (*IDSetBuilder) AddRange ¶
func (s *IDSetBuilder) AddRange(r tree.Range)
func (*IDSetBuilder) AddSet ¶
func (s *IDSetBuilder) AddSet(b *IDSet)
AddSet adds all IPs in b to s.
func (*IDSetBuilder) IPSet ¶
func (s *IDSetBuilder) IPSet() (*IDSet, error)
func (*IDSetBuilder) RemoveId ¶
func (s *IDSetBuilder) RemoveId(id tree.ID)
RemoveId removes all Ids in p from s.
func (*IDSetBuilder) RemoveRange ¶
func (s *IDSetBuilder) RemoveRange(r tree.Range)
RemoveRange removes all IPs in r from s.
Click to show internal directories.
Click to hide internal directories.