Skip to content

spakin/disjoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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]

About

Disjoint-set data structure for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages