gimpl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package gimpls provides standard implementations for graph methods that can help to implement groph graphs.

E.g. see the groph graphs and adjmtx package.

Index

Constants

View Source
const SetDelSize = 11

Variables

This section is empty.

Functions

func DEachEdge

func DEachEdge[W any, G groph.RDirected[W]](g G, onEdge groph.VisitEdgeW[W]) error

func DEachIn

func DEachIn[W any, G groph.RDirected[W]](g G, to groph.VIdx, onSource groph.VisitVertex) error

func DEachLeaf

func DEachLeaf[W any, G groph.RDirected[W]](g G, onLeaf groph.VisitVertex) error

func DEachOut

func DEachOut[W any, G groph.RDirected[W]](g G, from groph.VIdx, onDest groph.VisitVertex) error

func DEachRoot

func DEachRoot[W any, G groph.RDirected[W]](g G, onRoot groph.VisitVertex) error

func DInDegree

func DInDegree[W any, G groph.RDirected[W]](g G, v groph.VIdx) (d int)

func DLeafCount

func DLeafCount[W any, G groph.RDirected[W]](g G) (res int)

func DOutDegree

func DOutDegree[W any, G groph.RDirected[W]](g G, v groph.VIdx) (d int)

func DRootCount

func DRootCount[W any, G groph.RDirected[W]](g G) (res int)

func DSize

func DSize[W any, G groph.RDirected[W]](g G) (res int)

func TestDCleared

func TestDCleared[W any](t *testing.T, g groph.RGraph[W], what string)

func TestUCleared

func TestUCleared[W any](t *testing.T, g groph.RUndirected[W], what string)

func UDegree

func UDegree[W any](g groph.RUndirected[W], v groph.VIdx) (d int)

func UEachAdjacent

func UEachAdjacent[W any, G groph.RUndirected[W]](g G, of groph.VIdx, onNeighbour groph.VisitVertex) error

func UEachEdge

func UEachEdge[W any, G groph.RUndirected[W]](g G, onEdge groph.VisitEdgeW[W]) error

func UEdge

func UEdge[W any, G groph.RUndirected[W]](g G, u, v groph.VIdx) W

func USetEdge

func USetEdge[W any, G groph.WUndirected[W]](g G, u, v groph.VIdx, w W)

func USize

func USize[W any, G groph.RUndirected[W]](g G) (res int)

Types

type SetDelTest

type SetDelTest[W any] struct {
	Probe    W
	EqWeight func(a, b W) bool
	LazySize bool
}

TODO Break down tests into t.Run() calls

func (SetDelTest[W]) Directed

func (tst SetDelTest[W]) Directed(t *testing.T, g groph.WGraph[W])

func (SetDelTest[W]) Undirected

func (tst SetDelTest[W]) Undirected(t *testing.T, g groph.WUndirected[W])

Jump to

Keyboard shortcuts

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