algo

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StronglyConnectedComponents

func StronglyConnectedComponents(ctx context.Context, digraph container.DirectedGraph) ([]cardinality.Duplex[uint64], map[uint64]uint64)

Types

type ComponentGraph added in v0.4.0

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

func NewComponentGraph added in v0.4.0

func NewComponentGraph(ctx context.Context, originGraph container.DirectedGraph) ComponentGraph

func (ComponentGraph) CollectComponentMembers added in v0.4.0

func (s ComponentGraph) CollectComponentMembers(componentID uint64, members cardinality.Duplex[uint64])

func (ComponentGraph) ComponentHistogram added in v0.4.0

func (s ComponentGraph) ComponentHistogram(originNodes []uint64) map[uint64]uint64

func (ComponentGraph) ComponentReachable added in v0.4.0

func (s ComponentGraph) ComponentReachable(startComponent, endComponent uint64, direction graph.Direction) bool

func (ComponentGraph) ComponentSearch added in v0.4.0

func (s ComponentGraph) ComponentSearch(startComponent, endComponent uint64, direction graph.Direction) bool

func (ComponentGraph) ContainingComponent added in v0.4.0

func (s ComponentGraph) ContainingComponent(memberID uint64) (uint64, bool)

func (ComponentGraph) Digraph added in v0.4.0

func (ComponentGraph) HasMember added in v0.4.0

func (s ComponentGraph) HasMember(memberID uint64) bool

func (ComponentGraph) KnownMembers added in v0.4.0

func (s ComponentGraph) KnownMembers() cardinality.Duplex[uint64]

func (ComponentGraph) OriginReachable added in v0.4.0

func (s ComponentGraph) OriginReachable(startID, endID uint64) bool

type ReachabilityCache added in v0.4.0

type ReachabilityCache struct {
	Components ComponentGraph
	// contains filtered or unexported fields
}

func FetchFilteredReachabilityCache added in v0.4.0

func FetchFilteredReachabilityCache(ctx context.Context, db graph.Database, traversalKinds ...graph.Kind) (*ReachabilityCache, error)

func FetchReachabilityCache added in v0.4.0

func FetchReachabilityCache(ctx context.Context, db graph.Database, criteria graph.Criteria) (*ReachabilityCache, error)

func NewReachabilityCache added in v0.4.0

func NewReachabilityCache(ctx context.Context, digraph container.DirectedGraph, maxCacheSize int) *ReachabilityCache

func (*ReachabilityCache) CanReach added in v0.4.0

func (s *ReachabilityCache) CanReach(startID, endID uint64, direction graph.Direction) bool

func (*ReachabilityCache) OrReach added in v0.4.2

func (s *ReachabilityCache) OrReach(node uint64, direction graph.Direction, duplex cardinality.Duplex[uint64])

func (*ReachabilityCache) ReachOfComponentContainingMember added in v0.4.2

func (s *ReachabilityCache) ReachOfComponentContainingMember(member uint64, direction graph.Direction) cardinality.Duplex[uint64]

func (*ReachabilityCache) Stats added in v0.4.0

func (*ReachabilityCache) XorReach added in v0.4.2

func (s *ReachabilityCache) XorReach(node uint64, direction graph.Direction, duplex cardinality.Duplex[uint64])

type ReachabilityCacheStats added in v0.4.0

type ReachabilityCacheStats struct {
	Cached uint64
	Hits   uint64
}

Jump to

Keyboard shortcuts

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