Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findCycles ignores self-referencing cycles for graphs with named edges #111

Open
hcomnetworkers opened this issue Feb 5, 2020 · 0 comments

Comments

@hcomnetworkers
Copy link

The "findCycles" algorithm does currently not return any cycles caused by self referencing nodes.

Example

const graph = new graphlib.Graph({ multigraph: true });
graph.setNode('node1');
graph.setEdge('node1', 'node1', null, 'edge1');
const cycles = graphlib.alg.findCycles(graph);

The result should be [['node1']]

If the graph was initialized without named edges

const graph = new graphlib.Graph({ multigraph: true });
graph.setNode('node1');
graph.setEdge('node1', 'node1', null);
const cycles = graphlib.alg.findCycles(graph);

The result is [['node1']]

Is there any reason why the self referencing cycles cannot be found when using named edges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant