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

Collapse consecutive, dictionary nodes with only one, outgoing edge #72

Open
dylon opened this issue Jun 15, 2016 · 1 comment
Open

Comments

@dylon
Copy link
Member

dylon commented Jun 15, 2016

The dictionary

![Expanded Graph](http://g.gravizo.com/g?
digraph ExpandedGraph {
size="4,4";
rankdir="LR";
root -> A;
node [style=filled,fillcolor=red];
A -> B;
B -> C;
C -> D;
D -> E;
node [style=rounded,fillcolor=white];
E -> F;
E -> G;
A -> H;
})

will become

![Collapsed Graph](http://g.gravizo.com/g?
digraph CollapsedGraph {
size="3,3";
rankdir="LR";
root -> A;
node [style=filled,fillcolor=red];
A -> BCDE;
node [style=rounded,fillcolor=white];
BCDE -> F;
BCDE -> G;
A -> H;
})

@dylon
Copy link
Member Author

dylon commented Jun 15, 2016

This change would require the use of cursors that kept track of which node they were in, along with the index of the current character in that node.

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

No branches or pull requests

1 participant