Integration of the Rocha–Thatte cycle detection algorithm in directed graphs.
See wikipedia for more details about the algorithm.
Classes used:
- Node, know wich edges come in and out.
- Edge, know wich nodes it connects.
- Cycle, store the detected cycles
- Graph, the manager that contains the logic.
note: it had been a hell to translate form java to js!