unionfind

package
v0.0.0-...-6dfbae8 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package unionfind contains an implementation of a a disjoint-set (union-find) data structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnionFind

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

TODO UnionFind represent an union-find data structure.

func New

func New(size int) *UnionFind

func (*UnionFind) Connected

func (uf *UnionFind) Connected(p, q int) bool

func (*UnionFind) Find

func (uf *UnionFind) Find(i int) int

func (*UnionFind) Union

func (uf *UnionFind) Union(p, q int)

Jump to

Keyboard shortcuts

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