Skip to content

Commit 1377ff3

Browse files
authored
chore:Update README.md add CONTRIBUTING.md (#21)
2 parents 52ad736 + 64cb427 commit 1377ff3

File tree

2 files changed

+82
-9
lines changed

2 files changed

+82
-9
lines changed

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributing to bmssp-js
2+
3+
Thank you for your interest in contributing to **bmssp-js**! Your help is appreciated.
4+
5+
## Getting Started
6+
7+
1. **Fork the repository** and clone it locally.
8+
2. Install dependencies:
9+
```bash
10+
npm install
11+
```
12+
3. Create a new branch for your feature or bugfix:
13+
```bash
14+
git checkout -b your-feature-name
15+
```
16+
17+
## Development
18+
19+
- Follow the existing code style and conventions.
20+
- Write clear, concise commit messages.
21+
- Add or update tests as appropriate.
22+
23+
## Running Tests
24+
25+
Run all tests with:
26+
```bash
27+
npm test
28+
```
29+
30+
## Submitting Changes
31+
32+
1. Push your branch to your fork.
33+
2. Open a pull request against the `main` branch.
34+
3. Describe your changes and reference any related issues.
35+
36+
## Code of Conduct
37+
38+
Please be respectful and considerate in all interactions.
39+
40+
---
41+
42+
Thank you for contributing!

README.md

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

3-
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.
4-
"Breaking the Sorting Barrier for Directed Single-Source Shortest Paths".
7+
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.
58

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

8-
BMSSP - Bounded multi-source shortest paths.
11+
## Project Overview
912

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

12-
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.
1317

14-
## Development Details
18+
## Installation
1519

16-
This project is mainly focused in Javascript in order to be published to npmjs.com as a JS module (esmodule).
20+
To install this package, you can use npm:
21+
22+
```bash
23+
npm install bmssp
24+
```
25+
26+
## Usage
27+
28+
To use this package, you can import it in your JavaScript code as follows:
29+
30+
```javascript
31+
import { printMessage, processMessage } from "bmssp";
32+
33+
printMessage("Hello, World!");
34+
processMessage("Hello, World!");
35+
```
36+
37+
The file must use ECMAScript modules (ESM) syntax and have the `.mjs` file extension. Go to the `examples` directory for more usage examples.
38+
39+
### Using the docker image
40+
41+
You can also use the published docker image and run your tests (assuming a `mytest.mjs` in this example) in a pre-configured environment:
42+
43+
```bash
44+
docker run -it -v ./mytest.mjs:/bmssp-js/mytest.mjs sirivasv/bmssp-js:latest node /bmssp-js/mytest.mjs
45+
```
46+
47+
Other versions of the docker image can be found on [Docker Hub](https://hub.docker.com/r/sirivasv/bmssp-js/tags).
1748

1849
### Other Implementations in GitHub
1950

0 commit comments

Comments
 (0)