Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultLRUCacheDistance was optimized experimentally. It's the distance // in bits between cache hits. It's a tradeoff between leaning on the POPCNT // instruction between known offsets in the cache and the overhead of // maintaining the LRU. If the LRU gets cheaper to maintain, this may get // decreased. If POPCNT gets faster, this may increase. DefaultLRUCacheDistance = 512 )
View Source
const (
DefaultPagesize = 512 * 1024
)
Variables ¶
View Source
var FourBitsPerLayer = LayerDef{ // contains filtered or unexported fields }
View Source
var SixteenBitsPerLayer = LayerDef{ // contains filtered or unexported fields }
Functions ¶
This section is empty.
Types ¶
type Config ¶
var DefaultConfig Config = SixteenFourConfig
var FourFourConfig Config = Config{ TreeLayerDef: FourBitsPerLayer, CellLayerDef: FourBitsPerLayer, }
var SixteenFourConfig Config = Config{ TreeLayerDef: SixteenBitsPerLayer, CellLayerDef: FourBitsPerLayer, }
var SixteenSixteenConfig Config = Config{ TreeLayerDef: SixteenBitsPerLayer, CellLayerDef: SixteenBitsPerLayer, }
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) ExtractAll ¶
type K2Tree ¶
type K2Tree struct {
// contains filtered or unexported fields
}
K2Tree is the main data structure for this package. It represents a compressed representation of a graph adjacency matrix.
func NewWithConfig ¶
func (*K2Tree) Add ¶
Add asserts the existence of a link from node i to node j. i and j are zero-indexed, the tree will grow to support them if larger than the tree.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.