Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EdgeWeight ¶
type Graph ¶
type Graph[T any, W EdgeWeight] struct { Points []T Edges map[int]map[int]W }
A Graph is a network of points of type T and weighted, directed edges between them. Edges are represented by pairs of indexes into the Points slice. An undirected edge is represented as a symmetric pair of edges.
func NewUndirectedGraph ¶
func NewUndirectedGraph[T any, W EdgeWeight](points []T, edges map[[2]int]W) Graph[T, W]
Click to show internal directories.
Click to hide internal directories.