Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.42 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.42 KB

disjoint

Go Report Card Build Status Go Reference

Introduction

disjoint is a package for the Go programming language that implements a disjoint-set data structure (also known as a union-find data structure). Disjoint sets are collections of unordered elements in which an element belongs to exactly one set at a time. Sets can be merged destructively, meaning that the the original sets cease to exist once their union is taken. And elements can be compared for belonging to the same set. These operations run in amortized near-constant time.

Installation

disjoint is a Go module and therefore should be installed with

go get github.com/spakin/disjoint/v2

and imported with

import "github.com/spakin/disjoint/v2"

Usage

See the disjoint API documentation for details and examples.

Author

Scott Pakin, [email protected]