JSPM

@thi.ng/adjacency

2.3.17
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 522
  • Score
    100M100P100Q99273F
  • License Apache-2.0

Sparse & bitwise adjacency matrices, lists and selected traversal algorithms for directed & undirected graphs

Package Exports

  • @thi.ng/adjacency
  • @thi.ng/adjacency/api
  • @thi.ng/adjacency/bfs
  • @thi.ng/adjacency/binary
  • @thi.ng/adjacency/dfs
  • @thi.ng/adjacency/disjoint-set
  • @thi.ng/adjacency/floyd-warshall
  • @thi.ng/adjacency/list
  • @thi.ng/adjacency/mst
  • @thi.ng/adjacency/sparse

Readme

@thi.ng/adjacency

npm version npm downloads Mastodon Follow

This project is part of the @thi.ng/umbrella monorepo.

About

Sparse & bitwise adjacency matrices, lists and selected traversal algorithms for directed & undirected graphs.

Graph implementations

The following types all implement the IGraph interface and support both directed & undirected graphs:

Traversals

Status

STABLE - used in production

Search or submit any issues for this package

  • @thi.ng/dgraph - Type-agnostic directed acyclic graph (DAG) & graph operations

Installation

yarn add @thi.ng/adjacency

ES module import:

<script type="module" src="https://cdn.skypack.dev/@thi.ng/adjacency"></script>

Skypack documentation

For Node.js REPL:

const adjacency = await import("@thi.ng/adjacency");

Package sizes (brotli'd, pre-treeshake): ESM: 2.55 KB

Dependencies

Usage examples

Several demos in this repo's /examples directory are using this package.

A selection:

Screenshot Description Live demo Source
Poisson-disk shape-aware sampling, Voronoi & Minimum Spanning Tree visualization Demo Source

API

Generated API docs

TODO

Authors

If this project contributes to an academic publication, please cite it as:

@misc{thing-adjacency,
  title = "@thi.ng/adjacency",
  author = "Karsten Schmidt",
  note = "https://thi.ng/adjacency",
  year = 2018
}

License

© 2018 - 2023 Karsten Schmidt // Apache License 2.0