@graphty/algorithms / index / hasNegativeCycle
Function: hasNegativeCycle() ​
hasNegativeCycle(
graph):boolean
Defined in: algorithms/shortest-path/bellman-ford.ts:174
Check if graph has negative cycles using Bellman-Ford
Parameters ​
graph ​
The graph to check for negative cycles
Returns ​
boolean
True if the graph contains a negative cycle