structs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 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