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

Subgraphs #109

Open
moaxcp opened this issue Feb 28, 2018 · 1 comment
Open

Subgraphs #109

moaxcp opened this issue Feb 28, 2018 · 1 comment

Comments

@moaxcp
Copy link
Owner

moaxcp commented Feb 28, 2018

  • Define components of graph
graph {
    edge 'A', 'B'  
    subgraph {
        edge 'C', 'D'
        subgraph {
            edge 'X', 'Y'
        }
    }
    edge 'Y', 'Z'
}
  • When a vertex or edge is added it is added to parent subgraphs and main graph (may need listeners)
  • graphs are maps
  • subgraph is a graph
  • subgraph can have subgraphs
  • if vertex or edge is missing an entry it will check all parent graphs for entry and return found value
  • vertex or edge can be in multiple subgraphs
  • subgraph is always same type as main graph (share type variable)
  • subgraphs can be
  • if a named subgraph is used inside other subgraphs what is the behavior. How does grapgviz do it?
Graph {
    subgraph {
        color = 'blue'
        edge 'A', 'B'
    }
}

Edge and vertices will be blue.

@moaxcp
Copy link
Owner Author

moaxcp commented Mar 1, 2018

In graphviz

If a default attribute is defined using a node, edge, or graph statement, or by an attribute assignment not attached to a node or edge, any object of the appropriate type defined afterwards will inherit this attribute value. This holds until the default attribute is set to a new value, from which point the new value is used. Objects defined before a default attribute is set will have an empty string value attached to the attribute once the default attribute definition is made.

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