depgraph

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepMap

type DepMap[K any, V any] interface {
	maps.Map[K, V]
	AddDependencies(key K, keys ...K)
}

type DoubleMap

type DoubleMap[K any, V any] interface {
	DepMap[K, V]

	// GetDependencies recursively searches for all values that the key depends on.
	GetDependencies(key K) []K

	// GetDependents recursively searches for all values that depend on a key.
	GetDependents(key K) []K

	RangeDependencies(key K, r MutableRangeFunc[K, V])

	RangeDependents(key K, r MutableRangeFunc[K, V])

	RemoveDependencies(key K)
}

func NewDoubleMap

func NewDoubleMap[V any]() DoubleMap[any, V]

NewDoubleMap creates a DoubleMap comprised of two maps rather than a directed graph. This DoubleMap provides constant time lookups but more limited searching capabilities.

type MutableRangeFunc

type MutableRangeFunc[K any, V any] func(key K, val V, p DepMap[K, V]) bool

type Set

type Set[K any] interface {
	Add(key K)
	Remove(key K)
	GetAll() []K
}

func NewSet

func NewSet[K any]() Set[K]

Jump to

Keyboard shortcuts

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