This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
[BUG] is_cyclic not correctly working on undirected graphs #1518
Labels
bug
confirmed bug producing incorrect results
Description of bug
is_cyclic
does not behave as one would expect on undirected graphs, it seems as soon as there is an edgeu -- v
it thinks there is a cycleu -> v -> u
. This behavior makes sense for directed graphs but for undirected graphs this makes this function useless.How to reproduce
Create an undirected graph with at least one edge and run
is_directed
on it.Expected behavior
The function should only return true if there is a cycle that does not use the reverse of an edge.
Actual behavior
The function seems returns true as soon as there is at least one edge.
Code demonstrating bug
Version information
The text was updated successfully, but these errors were encountered: