bmssp
v0.13.0
Published
Javascript package implementation of the bmssp algorithm.
Maintainers
Readme
BMSSP: Bounded Multi-Source Shortest Paths
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.
Project Overview
- 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.
Installation
To install this package, you can use npm:
npm install bmsspUsage
To 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.
Using the docker image
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.
Other Implementations in GitHub
https://github.com/search?q=bmssp&type=repositories
