kahn

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBuildKahn      = errors.New("can't do topographical sorting")
	ErrBreakPointKahn = errors.New("don`t found topographical break point")
)

Functions

This section is empty.

Types

type Graph

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

func New

func New() *Graph

func (*Graph) Add

func (k *Graph) Add(from, to string)

Add - Adding a graph edge

func (*Graph) BreakPoint

func (k *Graph) BreakPoint(point string)

func (*Graph) Build

func (k *Graph) Build() error

Build - Perform sorting

func (*Graph) Result

func (k *Graph) Result() []string

Result - Getting a sorted slice

Jump to

Keyboard shortcuts

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