js-graph-algorithms
js-graph-algorithms copied to clipboard
Package provides javascript implementation of algorithms for graph processing
`g.addEdge(new jsgraphs.Edge(0,1,1)); g.addEdge(new jsgraphs.Edge(1,0,-1)); g.addEdge(new jsgraphs.Edge(1,2,1)); g.addEdge(new jsgraphs.Edge(2,1,-1)); g.addEdge(new jsgraphs.Edge(2,3,1)); g.addEdge(new jsgraphs.Edge(3,2,-1)); g.addEdge(new jsgraphs.Edge(3,1,1)); g.addEdge(new jsgraphs.Edge(1,3,-1));`
Fix 8
Fixes #8
The following line has an undeclared variable `x`: https://github.com/chen0040/js-graph-algorithms/blob/master/src/jsgraphs.js#L74 which is causing a compilation error in Angular 8.
var g = new jsgraphs.WeightedGraph(2); g.addEdge(new jsgraphs.Edge(0, 1, 5.0)); var dijkstra = new jsgraphs.Dijkstra(g, 0); var has0To1 = idijkstra.hasPathTo(1); // True.. as expected dijkstra1 = new jsgraphs.Dijkstra(g, 1); var has1To0...
Could You, please, create some simple example how to use this smart library in typescript? I receive "jsGraphs is not aviable" when trying to "var g = new jsGraphs.WeightedDiGraph(8);" in...
It should be 8, not 13
This would be infinitely more practical if I could add nodes and edges by unique string ID rather than numbers. For example, G6 graph visualization library works exclusively with string...
Upgraded to webpack 5.7 from 4.x and VueCli 5 from 4. In an es module using the js-graph-algorithms package. `const jsgraphs = require('js-graph-algorithms');` In this case jsgraphs is an empty...
When creating the min priority queue, the Dijkstra function passes in `return cost1, cost2` as the function, causing it to always return `cost2`: https://github.com/chen0040/js-graph-algorithms/blob/01b523553f2169923185cd0c39a434c5792e9458/src/jsgraphs.js#L938-L940 It should probably be `cost1 -...