This repository provides a community-driven JavaScript implementation of the Tsinghua Single Source Shortest Paths algorithm, based on the paper "Breaking the Sorting Barrier for Directed Single-Source Shortest Paths" by Duan Ran et al. from Tsinghua University.
BMSSP stands for Bounded Multi-Source Shortest Paths.
- Language: JavaScript (ES Modules)
- Goal: Provide an easy-to-use, modern implementation of the algorithm, published to npmjs.com.
- Reference: For more on ES modules, see the MDN documentation.
To install this package, you can use npm:
npm install bmsspTo use this package, you can import it in your JavaScript code as follows:
// This is a WIP example
import { BMSSP } from "bmssp";
const myBMSSP = new BMSSP([
[0, 1, 50],
[1, 2, 75],
[0, 2, 25],
]);
console.log(myBMSSP.graph);The file must use ECMAScript modules (ESM) syntax and have the .mjs file extension. Go to the examples directory for more usage examples.
You can also use the published docker image and run the example:
docker run -it sirivasv/bmssp-js:latestOr your tests in a pre-configured environment (replace folder-mytest/ with your tests folder and index.mjs with your test file):
docker run -it -v ./folder-mytest/:/bmssp-js/folder-mytest/ sirivasv/bmssp-js:latest node /bmssp-js/folder-mytest/index.mjsOther versions of the docker image can be found on Docker Hub.
https://github.com/search?q=bmssp&type=repositories