Skip to content

TypeScript SDK for Single-Source and Bounded Multiple Source Shortest Path (SSSP/BMSSP) algorithms. Includes Dijkstra with binary heap, designed for modern graph apps and research.

License

Notifications You must be signed in to change notification settings

Jeremy-Kr/sssp-monorepo

Repository files navigation

BMSSP / SSSP Monorepo

🇺🇸 English 🇰🇷 한국어

This repository is a monorepo that contains the Shortest / Bounded Multiple Source Shortest Path (BMSSP / SSSP) SDK and related applications.

  • SDK (@jeremy-kr/sssp-sdk): A reusable TypeScript SDK for shortest path algorithms. It currently ships with a Dijkstra implementation using a binary heap (O((n+m) log n)), and is designed to evolve toward BMSSP/SSSP.
  • Apps: Planned demos and a benchmarking website to compare performance across languages (TypeScript, Rust, Go, etc.).

Why this project?

Shortest-path computation is fundamental—routing, dependency resolution, scheduling, graph analytics, and more.
This project aims to provide:

  • A clean, modern SDK for TypeScript/JavaScript projects
  • A playground for new research ideas such as BMSSP
  • Cross-language benchmarks that are easy to reproduce

Repository structure

apps/                # Example apps and benchmarks (planned)
packages/
  sssp-sdk/          # Core SDK package
turbo.json           # Turborepo config
package.json         # Workspace root
LICENSE              # Apache-2.0

Installation

bun add @jeremy-kr/sssp-sdk
# or
npm install @jeremy-kr/sssp-sdk

Usage example

import { AdjListGraph, sssp } from "@jeremy-kr/sssp-sdk";

const g = new AdjListGraph([[[1, 1]], [[2, 2]], []]);

const { dist } = await sssp(0, g);
console.log(Object.fromEntries(dist)); // { '0': 0, '1': 1, '2': 3 }

Design goals

  • Simple API surface: AdjListGraph, dijkstra, sssp
  • Performance-minded: binary-heap implementation today; room for specialized queues later
  • Extensible: multiple graph backends (array- and map-based adjacency), NodeId as number|string

Roadmap

  • Replace the SSSP placeholder with a first BMSSP implementation
  • Benchmark site (inputs, presets, CSV export, charts)
  • More graph structures (CSR-like, typed arrays)
  • Docs site with API reference & guides

Contributing

Issues and PRs are welcome. Please include motivation, design notes, and tests.

License

Licensed under the Apache License 2.0.

About

TypeScript SDK for Single-Source and Bounded Multiple Source Shortest Path (SSSP/BMSSP) algorithms. Includes Dijkstra with binary heap, designed for modern graph apps and research.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published