Graph

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph[T VertexElementer] struct {
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph[T VertexElementer](sf uts.SortFunc[*Vertex[T]]) *Graph[T]

func (*Graph[T]) AddEdge

func (g *Graph[T]) AddEdge(from, to *Vertex[T])

func (*Graph[T]) AddVertex

func (g *Graph[T]) AddVertex(v *Vertex[T])

type Vertex

type Vertex[T VertexElementer] struct {
	// contains filtered or unexported fields
}

func NewVertex

func NewVertex[T VertexElementer](value T) *Vertex[T]

func (*Vertex[T]) Copy

func (v *Vertex[T]) Copy() uc.Copier

func (*Vertex[T]) Equals

func (v *Vertex[T]) Equals(other uc.Equaler) bool

func (*Vertex[T]) GetValue

func (v *Vertex[T]) GetValue() T

type VertexElementer

type VertexElementer interface {
	uc.Equaler
	uc.Copier
}

Jump to

Keyboard shortcuts

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