Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing to bmssp-js

Thank you for your interest in contributing to **bmssp-js**! Your help is appreciated.

## Getting Started

1. **Fork the repository** and clone it locally.
2. Install dependencies:
```bash
npm install
```
3. Create a new branch for your feature or bugfix:
```bash
git checkout -b your-feature-name
```

## Development

- Follow the existing code style and conventions.
- Write clear, concise commit messages.
- Add or update tests as appropriate.

## Running Tests

Run all tests with:
```bash
npm test
```

## Submitting Changes

1. Push your branch to your fork.
2. Open a pull request against the `main` branch.
3. Describe your changes and reference any related issues.

## Code of Conduct

Please be respectful and considerate in all interactions.

---

Thank you for contributing!
49 changes: 40 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,50 @@
# Tsinghua Single Source Shortest Paths algorithm
# BMSSP: Bounded Multi-Source Shortest Paths
[![codecov](https://codecov.io/gh/sirivasv/bmssp-js/branch/main/graph/badge.svg)](https://codecov.io/gh/sirivasv/bmssp-js)
[![npm version](https://img.shields.io/npm/v/bmssp.svg)](https://www.npmjs.com/package/bmssp)
[![Docker Image Version](https://img.shields.io/docker/v/sirivasv/bmssp-js?label=docker&sort=semver)](https://hub.docker.com/r/sirivasv/bmssp-js)
[![GitHub Repo stars](https://img.shields.io/github/stars/sirivasv/bmssp-js?style=social)](https://github.com/sirivasv/bmssp-js/stargazers)

This is a repository containing a simple community driven implementation in Javascript based on the paper written by Duan Ran et. al. from Tsinghua University.
"Breaking the Sorting Barrier for Directed Single-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"](https://dl.acm.org/doi/10.1145/3717823.3718179) by Duan Ran et al. from Tsinghua University.

https://dl.acm.org/doi/10.1145/3717823.3718179
BMSSP stands for Bounded Multi-Source Shortest Paths.

BMSSP - Bounded multi-source shortest paths.
## Project Overview

## Abstract
- **Language:** JavaScript (ES Modules)
- **Goal:** Provide an easy-to-use, modern implementation of the algorithm, published to [npmjs.com](https://www.npmjs.com/).
- **Reference:** For more on ES modules, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules).

We give a deterministic O(mlog2/3n)-time algorithm for single-source shortest paths (SSSP) on directed graphs with real non-negative edge weights in the comparison-addition model. This is the first result to break the O(m+nlogn) time bound of Dijkstra’s algorithm on sparse graphs, showing that Dijkstra’s algorithm is not optimal for SSSP.

## Development Details
## Installation

This project is mainly focused in Javascript in order to be published to npmjs.com as a JS module (esmodule).
To install this package, you can use npm:

```bash
npm install bmssp
```

## Usage

To use this package, you can import it in your JavaScript code as follows:

```javascript
import { printMessage, processMessage } from "bmssp";

printMessage("Hello, World!");
processMessage("Hello, World!");
```

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 your tests (assuming a `mytest.mjs` in this example) in a pre-configured environment:

```bash
docker run -it -v ./mytest.mjs:/bmssp-js/mytest.mjs sirivasv/bmssp-js:latest node /bmssp-js/mytest.mjs
```

Other versions of the docker image can be found on [Docker Hub](https://hub.docker.com/r/sirivasv/bmssp-js/tags).

### Other Implementations in GitHub

Expand Down