paths

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCycle

func IsCycle(path []*vertexes.Vertex) bool

IsCycle returns true if the nodes form a cycle

func IsPath

func IsPath(path []*vertexes.Vertex) bool

IsPath returns true if the nodes form a path

Types

type Path

type Path struct {
	// contains filtered or unexported fields
}

func NewPath

func NewPath(maxLen int) Path

func (*Path) Contains

func (p *Path) Contains(node vertexes.Vertex) bool

func (*Path) Get

func (p *Path) Get() []*vertexes.Vertex

func (*Path) Len

func (p *Path) Len() int

func (*Path) Pop

func (p *Path) Pop() (*vertexes.Vertex, int)

func (*Path) PopAndTrack

func (p *Path) PopAndTrack() (*vertexes.Vertex, int)

func (*Path) Push

func (p *Path) Push(node *vertexes.Vertex, depth int)

func (*Path) PushAndTrack

func (p *Path) PushAndTrack(node *vertexes.Vertex, depth int)

func (*Path) Reset

func (p *Path) Reset()

Jump to

Keyboard shortcuts

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