package
2.16.0
Repository: https://github.com/tawesoft/golib.git
Documentation: pkg.go.dev

# Functions

Leaves returns an iterator that generates indexes of vertexes that have exactly one parent and exactly zero children in a directed graph.
NewAdjacencyMatrix returns an AdjacencyMatrix.
NewBfsTree returns a new (empty) breadth-first search tree object for storing results.
NewDegreeMatrix returns a new degree matrix of undefined size.
NewMultiAdjacencyMatrix returns an AdjacencyMatrix.
Roots returns an iterator that generates only the indexes of vertexes that have no parents i.e.
TeeDecremental returns a new Decremental interface whose methods, when called, are also called on `a` and `b`.
TeeDynamic returns a new Dynamic interface whose methods, when called, are also called on `a` and `b`.
TeeIncremental returns a new Incremental interface whose methods, when called, are also called on `a` and `b`.

# Structs

AdjacencyMatrix represents the number of directed edges from a source vertex (along the x-axis) to a target vertex (along the y-axis), including self-loops, if any.
BfsTree represents a (unweighted) breadth-first tree of the reachable graph from a given start vertex, taking the shortest number of edges.
DegreeMatrix represents the number of edges on a vertex (to or from any other vertex in aggregate).
FilterEdges implements the graph [Iterator] interface and represents a subgraph of a parent graph of only edges that satisfy the given filter function.
FilterVertexes implements the graph [Iterator] interface and represents a subgraph of a parent graph of only vertexes that satisfy the given filter function.

# Interfaces

Decremental is an interface for any dynamic graph implementation or online algorithm that can efficiently update to give a useful result if a graph changes by the removal of a vertex or edge, or if an edge weight increases.
Dynamic is an interface for any dynamic graph implementation or online algorithm that can efficiently update to give a useful result if a graph changes.
Incremental is an interface for any dynamic graph implementation or online algorithm that can efficiently update to give a useful result if a graph changes by the addition of a vertex or edge, or if an edge weight decreases.
Iterator is the basic interface that a graph data type must implement to be able to use many of the algorithms in this package.

# Type aliases

EdgeIterator is the type of a generator function that, for some particular source vertex, generates each target vertex connected by at least one directed edge, and a count of the number of edges between them.
VertexIndex is a non-negative index that uniquely identifies each vertex in a graph.
VertexIterator is the type of a generator function that, for some particular graph, generates a VertexIndex for each vertex in the graph.
Weight represents the "cost" of a weighted edge from one vertex to another.
WeightFunc is the type of a function that gives a weight between two vertexes in a graph.