Your response might be interpreted as being a little bit condescending.
That wasn’t my intention. We actually had an extensive discussion about this on Gitter and in the LightGraphs issues where my original view was changed. The fact remains that an edge in an undirected graph from
v can imply bidirectional connectivity, which creates a cycle. If you don’t want that behavior in LightGraphs (which is the specific package to which the original question referred) then you must use a directed graph.
A better answer would be that any undirected graph can be seen as a directed graph where the existence of edge from vertex i to vertex j , implies the existence of an edge from vertex j to I
Except that’s potentially misleading in the context of LightGraphs, since we treat directed graphs as completely separate types from undirected graphs, with different backend storage. Your definition works in the abstract, but it does not reflect the design decisions we made in LightGraphs that might argue for a different approach to the problem.
If you have a meaningful definition of cyclicity that applies to undirected graphs, I’m all ears and would absolutely be willing to reopen the LightGraphs issue (above) in which we came to the conclusion that, in fact, cyclicity doesn’t mean much in the context of undirected graphs.