Help us shape the future of Go! Take the 2026 Go Developer Survey

structs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGraph added in v0.2.0

func NewGraph() *graph

NewGraph is a constructor of the Graph

func NewSortedUniqueQueue

func NewSortedUniqueQueue(compareFunc CompareFunc) *sortedUniqueList

NewSortedUniqueQueue is a constructor for the sortedUniqueList

Types

type CompareFunc

type CompareFunc func(a Item, b Item) bool

CompareFunc is a function to sort nodes in a queue

type Graph added in v0.2.0

type Graph interface {
	AddEdge(from, to string)
	IsCyclic() bool
	GetPres(target string) []string
}

Graph is an graph interface

type Item

type Item interface {
	DeepCopy() Item
	Equals(Item) bool
}

Item is an interface for the nodes to be stored in a queue

type IteratorFunc

type IteratorFunc func(Item)

IteratorFunc is a function to be used for each item in the queue

type SortedUniqueList

type SortedUniqueList interface {
	Add(item Item)
	First() Item
	ForEach(iteratorFunc IteratorFunc)
	Delete(i Item)
	Len() int
}

SortedUniqueList is an interface of sortedUniqueList

Jump to

Keyboard shortcuts

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