container

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntryFieldSizeBytes  = 8                       // Size of a 64-bit hash
	EntrySizeBytes       = EntryFieldSizeBytes * 2 // Key 64-bit hash + Value 64-bit hash
	DefaultMaxValue      = math.MaxUint64
	DefaultNumMaxEntries = 8_000_000_000
	DefaultNumBuckets    = 1024 * 128
)

Variables

View Source
var (
	ErrUnorderedAppend      = errors.New("unordered append")
	ErrValueOutsideUniverse = errors.New("value outside EFSet universe")
)

Functions

This section is empty.

Types

type AdjacencyMap

type AdjacencyMap map[uint64]cardinality.Duplex[uint64]

type DirectedGraph

type DirectedGraph interface {
	AddEdge(start, end graph.ID)
	NumNodes() uint64
	Nodes() cardinality.Duplex[uint64]
	Degrees(node uint64, direction graph.Direction) uint64
	Adjacent(node uint64, direction graph.Direction) []uint64
	EachNode(delegate func(node uint64) bool)
	EachAdjacent(node uint64, direction graph.Direction, delegate func(adjacent uint64) bool)
	BFSTree(nodeID uint64, direction graph.Direction) []ShortestPathTerminal
	Normalize() ([]uint64, DirectedGraph)
	Dimensions(direction graph.Direction) (uint64, uint64)
}

func FetchDirectedGraph

func FetchDirectedGraph(ctx context.Context, graphDB graph.Database, relationshipFilter graph.Criteria) (DirectedGraph, error)

func NewDirectedGraph

func NewDirectedGraph() DirectedGraph

type EFSet

type EFSet struct {
	// contains filtered or unexported fields
}

func AllocateEFSet

func AllocateEFSet(universeMin, universeMax uint64, maxValues uint) *EFSet

func CompressToEFSet

func CompressToEFSet(values []uint64) *EFSet

func NewEFSet

func NewEFSet(universeMin, universeMax uint64, maxValues uint) *EFSet

func (*EFSet) Append

func (s *EFSet) Append(value uint64) error

func (*EFSet) Find

func (s *EFSet) Find(target uint64) (uint, bool)

func (*EFSet) Iterator

func (s *EFSet) Iterator() iter.Seq2[uint, uint64]

func (*EFSet) Len

func (s *EFSet) Len() uint

func (*EFSet) Lookup

func (s *EFSet) Lookup(index uint) uint64

func (*EFSet) MustAppend

func (s *EFSet) MustAppend(value uint64)

type EFSetIterator

type EFSetIterator struct {
	// contains filtered or unexported fields
}

func NewEFSetIterator

func NewEFSetIterator(vec *EFSet) *EFSetIterator

func (*EFSetIterator) Next

func (s *EFSetIterator) Next() uint64

type PackedMap

type PackedMap struct {
	// contains filtered or unexported fields
}

func NewPacMap

func NewPacMap(parameters Parameters) *PackedMap

func (*PackedMap) Compact

func (s *PackedMap) Compact()

func (*PackedMap) CompactParallel

func (s *PackedMap) CompactParallel(workers int)

func (*PackedMap) Get

func (s *PackedMap) Get(key uint64) (uint64, bool)

func (*PackedMap) Put

func (s *PackedMap) Put(key, value uint64)

type Parameters

type Parameters struct {
	BucketKeyStride uint64
	NumMaxEntries   int
	NumBuckets      int
}

func DefaultParameters

func DefaultParameters() Parameters

type ShortestPathTerminal

type ShortestPathTerminal struct {
	NodeID   uint64
	Distance Weight
}

type Weight

type Weight = float64

Jump to

Keyboard shortcuts

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