Documentation
¶
Overview ¶
Package allot contains the precalculated bitsets of all baseIndices, which for a given prefix contain all longer prefixes covered by it.
Please read the ART paper ./doc/artlookup.pdf to understand the baseIndex algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdxToFringeRoutes ¶
IdxToFringeRoutes as precalculated bitsets,
Map the baseIndex to a bitset as a precomputed complete binary tree.
// 1 <= idx <= 511
func allotRec(aTbl *bitset.BitSet, idx uint) {
aTbl = aTbl.Set(idx)
if idx > 255 {
return
}
allotRec(aTbl, idx<<1)
allotRec(aTbl, idx<<1+1)
}
Only used for fast bitset intersections instead of range loops in table overlaps methods.
func IdxToPrefixRoutes ¶
IdxToPrefixRoutes as precalculated bitsets,
Map the baseIndex to a bitset as a precomputed complete binary tree.
// 1 <= idx <= 511
func allotRec(aTbl *bitset.BitSet, idx uint) {
aTbl = aTbl.Set(idx)
if idx > 255 {
return
}
allotRec(aTbl, idx<<1)
allotRec(aTbl, idx<<1+1)
}
Only used for fast bitset intersections instead of range loops in table overlaps methods.
Types ¶
This section is empty.