gca
Graph Classical Algorithms: Use classic algorithms like BFS and Edmonds Krap on graphs.
Installation
npm i gca
Usage
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);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
API
Full documentation can be found here.
A changelog file can be found here.
Also, there an example.js page.
Author
Amir Liberzon
LinkedIn Profile
Github Profile
License
This project is licensed under the MIT License - see the LICENSE.md file for details.