gca
Version:
Use classic algorithms for Graphs.
49 lines (31 loc) • 1.22 kB
Markdown
Graph Classical Algorithms: Use classic algorithms like BFS and Edmonds Krap on graphs.
```bash
npm i gca
```
```js
const gca = require('gca');
const tool = new gca();
let graph = tool.CreateGraph();
graph.addNode(1);
graph.addNode(2);
graph.addEdge(1, 2);
let bfsGraph = tool.BFS(graph, 1);
let flowGraph = tool.CreateFlowGraph();
flowGraph.addEdge(flowGraph.s, flowGraph.t);
let maxFlow = tool.EdmondsKarp(flowGraph);
```
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Full documentation can be found [here](https://amirlib.github.io/gca/#/).
A changelog file can be found [here](https://github.com/amirlib/gca/blob/master/CHANELOG.md).
Also, there an [example.js](https://github.com/amirlib/gca/blob/master/example.js) page.
[](https://www.linkedin.com/in/amir-liberzon-23aa3a159/)
[](https://github.com/amirlib/)
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/babudabu/gca/blob/master/LICENSE) file for details.