topology_builder

Module topology_builder.

Responsible for building all possible topologies base on basic user input:

  • number of initial state particles

  • number of final state particles

class SimpleStateTransitionTopologyBuilder(interaction_node_set: Sequence[expertsystem.topology.graph.InteractionNode])[source]

Bases: object

Simple topology builder.

Recursively tries to add the interaction nodes to available open end edges/lines in all combinations until the number of open end lines matches the final state lines.

build_graphs(number_of_initial_edges: int, number_of_final_edges: int) → List[expertsystem.topology.graph.StateTransitionGraph][source]
extend_graph(graph: Tuple[expertsystem.topology.graph.StateTransitionGraph, Sequence[int]]) → List[Tuple[expertsystem.topology.graph.StateTransitionGraph, List[int]]][source]
attach_node_to_edges(graph: Tuple[expertsystem.topology.graph.StateTransitionGraph, Sequence[int]], interaction_node: expertsystem.topology.graph.InteractionNode, ingoing_edge_ids: Sequence[int]) → Tuple[expertsystem.topology.graph.StateTransitionGraph, List[int]][source]