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

Infinite loop caused by nested sub-graphs #15

Closed
badams opened this issue Apr 29, 2017 · 1 comment
Closed

Infinite loop caused by nested sub-graphs #15

badams opened this issue Apr 29, 2017 · 1 comment

Comments

@badams
Copy link

badams commented Apr 29, 2017

Creating a graph with nesting of more than two levels causes an infinite loop.

screen shot 2017-04-29 at 2 09 27 pm

Steps to reproduce

Create nested graph structure like so.

$graph = new Digraph('G');
$graph->node('A')->edge(['A', 'B']);

$sub1 = $graph
    ->subgraph('cluster_1')
    ->node('B')
    ->edge(['B', 'C']);

$sub2 = $sub1->subgraph('cluster_2')
    ->node('C')
    ->edge(['C', 'D']);

$sub3 = $sub2->subgraph('cluster_3')
    ->node('D');

The final call to Subgraph::createEdge() will create an infinite loop as it is unable to resolve the top level graph.

@alexandresalome
Copy link
Owner

Fixed in version 2

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

2 participants