data.LeveledGraph

data.LeveledGraph(self)

A LeveledGraph object models a graph with hierarchical topological structure.

In a LeveledGraph, nodes represent topological changes while edges represent the connections (or links) between these changes. The class provides factory methods for creating new graph instances, as well as nodes and edges, and it offers operations such as branching an edge to insert an intermediate node.

Methods

Name Description
branch Connect edge.start to midnode and midnode to edge.end and then remove edge.
create_edge Factory method for creating a TopologicalLink edge.
create_graph Factory method to create a new LeveledGraph instance.
create_node Factory method for creating a TopologicalChange node.

branch

data.LeveledGraph.branch(edge, midnode)

Connect edge.start to midnode and midnode to edge.end and then remove edge.

Returns

Name Type Description
tuple of TopologicalLink A tuple containing the two newly created edges: - The first edge connects the original start node to midnode. - The second edge connects midnode to the original end node.

create_edge

data.LeveledGraph.create_edge(*args, **kwgs)

Factory method for creating a TopologicalLink edge.

create_graph

data.LeveledGraph.create_graph()

Factory method to create a new LeveledGraph instance.

Returns

Name Type Description
LeveledGraph A new instance of LeveledGraph.

create_node

data.LeveledGraph.create_node(*args, **kwgs)

Factory method for creating a TopologicalChange node.

Returns

Name Type Description
TopologicalChange A new instance of TopologicalChange with the specified properties.