Documentation
¶
Index ¶
- Constants
- Variables
- func AdjacentNodes(digraph DirectedGraph, node uint64, direction graph.Direction) []uint64
- func Degrees(digraph DirectedGraph, node uint64, direction graph.Direction) uint64
- func Dimensions(digraph DirectedGraph, direction graph.Direction) (uint64, uint64)
- func MarshalSegment(segment *Segment, writer io.Writer) error
- func Reach(digraph DirectedGraph, nodeID uint64, direction graph.Direction) cardinality.Duplex[uint64]
- func TSBFS(ts Triplestore, nodeID uint64, direction graph.Direction, maxDepth int, ...) int
- func TSDFS(ts Triplestore, nodeID uint64, direction graph.Direction, maxDepth int, ...) int
- func TSStatelessBFS(ts Triplestore, rootNode uint64, direction graph.Direction, maxDepth int, ...) int
- type AdjacencyMap
- type BFSTreeFile
- type DirectedGraph
- type EFSet
- type EFSetIterator
- type Edge
- type KindDatabase
- type KindMap
- type MutableDirectedGraph
- type MutableTriplestore
- type PackedMap
- type Parameters
- type PathTerminal
- type Segment
- type SerializedSegment
- type Triplestore
- type Weight
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 ¶
func AdjacentNodes ¶ added in v0.4.0
func AdjacentNodes(digraph DirectedGraph, node uint64, direction graph.Direction) []uint64
func Degrees ¶ added in v0.4.0
func Degrees(digraph DirectedGraph, node uint64, direction graph.Direction) uint64
func Dimensions ¶ added in v0.4.0
func Dimensions(digraph DirectedGraph, direction graph.Direction) (uint64, uint64)
func Reach ¶ added in v0.4.0
func Reach(digraph DirectedGraph, nodeID uint64, direction graph.Direction) cardinality.Duplex[uint64]
func TSStatelessBFS ¶ added in v0.4.0
func TSStatelessBFS(ts Triplestore, rootNode uint64, direction graph.Direction, maxDepth int, descentFilter func(edge Edge) (Weight, bool), terminalHandler func(terminal PathTerminal) bool, numWorkers int) int
SSPBFS is a parallel stateless shortest-path breadth-first search.
Types ¶
type AdjacencyMap ¶
type AdjacencyMap map[uint64]cardinality.Duplex[uint64]
type BFSTreeFile ¶ added in v0.4.0
func WriteZoneBFSTree ¶ added in v0.4.0
func WriteZoneBFSTree(zoneNodes graph.NodeSet, ts Triplestore, scratchPath string, maxDepth int) (BFSTreeFile, error)
func (BFSTreeFile) Remove ¶ added in v0.4.0
func (s BFSTreeFile) Remove() error
type DirectedGraph ¶
type DirectedGraph interface {
NumNodes() uint64
EachNode(delegate func(node uint64) bool)
EachAdjacentNode(node uint64, direction graph.Direction, delegate func(adjacent uint64) bool)
}
func FetchDirectedGraph ¶
func FetchFilteredDirectedGraph ¶ added in v0.4.0
type EFSet ¶
type EFSet struct {
// contains filtered or unexported fields
}
func AllocateEFSet ¶
func CompressToEFSet ¶
func (*EFSet) MustAppend ¶
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 KindDatabase ¶ added in v0.4.0
type MutableDirectedGraph ¶ added in v0.4.0
type MutableDirectedGraph interface {
DirectedGraph
AddNode(node uint64)
AddEdge(start, end uint64)
}
func BuildAdjacencyMapGraph ¶ added in v0.4.3
func BuildAdjacencyMapGraph(adj map[uint64][]uint64) MutableDirectedGraph
func BuildGraph ¶ added in v0.4.3
func BuildGraph(constructor func() MutableDirectedGraph, adj map[uint64][]uint64) MutableDirectedGraph
func NewAdjacencyMapGraph ¶ added in v0.4.0
func NewAdjacencyMapGraph() MutableDirectedGraph
func NewCSRGraph ¶ added in v0.4.0
func NewCSRGraph() MutableDirectedGraph
NewCSRGraph creates an empty mutable directed graph that uses CSR internally.
type MutableTriplestore ¶ added in v0.4.0
type MutableTriplestore interface {
Triplestore
AddTriple(edge, start, end uint64)
}
func NewTriplestore ¶ added in v0.4.0
func NewTriplestore() MutableTriplestore
type PackedMap ¶
type PackedMap struct {
// contains filtered or unexported fields
}
func NewPacMap ¶
func NewPacMap(parameters Parameters) *PackedMap
func (*PackedMap) CompactParallel ¶
type Parameters ¶
func DefaultParameters ¶
func DefaultParameters() Parameters
type PathTerminal ¶ added in v0.4.0
func BFSTree ¶ added in v0.4.0
func BFSTree(digraph DirectedGraph, nodeID uint64, direction graph.Direction) []PathTerminal
type Segment ¶ added in v0.4.0
func UnmarshalSegment ¶ added in v0.4.0
type SerializedSegment ¶ added in v0.4.0
func (SerializedSegment) ToSegment ¶ added in v0.4.0
func (s SerializedSegment) ToSegment() *Segment
type Triplestore ¶ added in v0.4.0
type Triplestore interface {
DirectedGraph
NumEdges() uint64
EachEdge(delegate func(next Edge) bool)
EachAdjacentEdge(node uint64, direction graph.Direction, delegate func(next Edge) bool)
Projection(deletedNodes, deletedEdges cardinality.Duplex[uint64]) Triplestore
}
Click to show internal directories.
Click to hide internal directories.