TypedArray-based disjoint set implementation with quick union & path compression
npm install @thi.ng/disjoint-set
!npm downloads

> [!NOTE]
> This is one of 214 standalone projects, maintained as part
> of the @thi.ng/umbrella monorepo
> and anti-framework.
>
> 🚀 Please help me to work full-time on these projects by sponsoring me on
> GitHub. Thank you! ❤️
- About
- Status
- Related packages
- Blog posts
- Installation
- Dependencies
- API
- Authors
- License
TypedArray-based disjoint set implementation with quick union & path compression.
This package contains functionality which was previously part of and has been
extracted from the @thi.ng/adjacency package.
STABLE - used in production
Search or submit any issues for this package
- @thi.ng/adjacency - Sparse & bitwise adjacency matrices, lists and selected traversal algorithms for directed & undirected graphs
- Of umbrellas, transducers, reactive streams & mushrooms (Pt. 4)
``bash`
yarn add @thi.ng/disjoint-set
ESM import:
`ts`
import * as ds from "@thi.ng/disjoint-set";
Browser ESM import:
`html`
For Node.js REPL:
`js`
const ds = await import("@thi.ng/disjoint-set");
Package sizes (brotli'd, pre-treeshake): ESM: 420 bytes
None
TODO
If this project contributes to an academic publication, please cite it as:
`bibtex``
@misc{thing-disjoint-set,
title = "@thi.ng/disjoint-set",
author = "Karsten Schmidt",
note = "https://thi.ng/disjoint-set",
year = 2019
}
© 2019 - 2026 Karsten Schmidt // Apache License 2.0