Graph

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 2 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]() *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]) Compare

func (v *Vertex[T]) Compare(other uc.Comparer) (int, bool)

func (*Vertex[T]) Copy

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

func (*Vertex[T]) Equals

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

type VertexElementer added in v0.3.13

type VertexElementer interface {
	uc.Comparer
	uc.Equaler
	uc.Copier
}

Jump to

Keyboard shortcuts

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