Documentation
¶
Index ¶
- Variables
- type EdgeInfo
- type Graph
- func (graph *Graph[T, Label]) AddOrientedEdge(vertexFrom, vertexTo Label) error
- func (graph *Graph[T, Label]) AddOrientedEdges(edges ...EdgeInfo[Label]) (err error)
- func (graph *Graph[T, Label]) AddUndirectedEdge(vertexFirst, vertexSecond Label) error
- func (graph *Graph[T, Label]) AddUndirectedEdges(edges ...EdgeInfo[Label]) (err error)
- func (graph *Graph[T, Label]) AddVertex(label Label, value T)
- func (graph *Graph[T, Label]) BFS(startVertex Label, visitor Visitor[T])
- func (graph *Graph[T, Label]) DFS(startVertex Label, visitor Visitor[T])
- func (graph *Graph[T, Label]) DeleteOrientedEdge(vertexFrom, vertexTo Label) error
- func (graph *Graph[T, Label]) DeleteUndirectedEdge(vertexFirst, vertexSecond Label) error
- func (graph *Graph[T, Label]) DeleteVertex(label Label)
- func (graph *Graph[T, Label]) SetVertexes(vertexes []VertexInfo[T, Label])
- type Node
- type ValueNode
- type VertexInfo
- type Visitor
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotFoundVertex = errors.New("Not found vertex")
Functions ¶
This section is empty.
Types ¶
type EdgeInfo ¶
type EdgeInfo[Label comparable] struct { VertexFrom Label VertexTo Label }
type Graph ¶
type Graph[T any, Label comparable] struct { // contains filtered or unexported fields }
func NewGraph ¶
func NewGraph[T any, Label comparable](vertexes []VertexInfo[T, Label]) *Graph[T, Label]
func (*Graph[T, Label]) AddOrientedEdge ¶
func (*Graph[T, Label]) AddOrientedEdges ¶
func (*Graph[T, Label]) AddUndirectedEdge ¶
func (*Graph[T, Label]) AddUndirectedEdges ¶
func (*Graph[T, Label]) DeleteOrientedEdge ¶
func (*Graph[T, Label]) DeleteUndirectedEdge ¶
func (*Graph[T, Label]) DeleteVertex ¶
func (graph *Graph[T, Label]) DeleteVertex(label Label)
func (*Graph[T, Label]) SetVertexes ¶
func (graph *Graph[T, Label]) SetVertexes(vertexes []VertexInfo[T, Label])
type Node ¶
type Node[T any, Label comparable] struct { ValueNode[T] // contains filtered or unexported fields }
type VertexInfo ¶
type VertexInfo[T any, Label comparable] struct { Label Label Value T }
Click to show internal directories.
Click to hide internal directories.