Tree Concept.
Bases: core.graph.interface.treeconcept.MutableTreeConcept
Add a tree after the children of the parent vertex. Complexity have to be O(1) if tree == sub_tree()
Parameters: |
|
---|
Bases: core.graph.interface.treeconcept.RootedTreeConcept, core.graph.interface.graphconcept.MutableVertexGraphConcept
A mutable rooted tree. The substitute method is defined outside the interface. substitute(self,vid,tree)
Add a child at the end of children
Parameters: |
|
---|
Bases: core.graph.interface.treeconcept.RootedTreeConcept
An ordered tree is a rooted tree where an order relation is defined between chidren.
Return the first child of vid
Parameters: | vid -- The vertex identifier. |
---|---|
Returns: | vid |
Bases: core.graph.interface.graphconcept.VertexListGraphConcept
Rooted Tree interface.
depth(vid), depth() and sub_tree(vid) can be extenal algorithms.
Return a vertex iterator
Parameters: | vtx_id -- The vertex identifier. |
---|---|
Returns: | iter of vertex identifier |
Return the number of children
Parameters: | vtx_id -- The vertex identifier. |
---|---|
Return type: | int |
Return the parent of vtx_id.
Parameters: | vtx_id -- The vertex identifier. |
---|---|
Returns: | vertex identifier |
Return an iterator of vtx_id siblings. vtx_id is not include in siblings.
Parameters: | vtx_id -- The vertex identifier. |
---|---|
Returns: | iter of vertex identifier |
Return the tree root.
Returns: | vertex identifier |
---|