Visualize Module

chipfiring.CFVisualizer._graph_to_cytoscape_elements(graph: CFGraph)[source]

Converts a CFGraph object to a list of elements for Dash Cytoscape.

chipfiring.CFVisualizer._divisor_to_cytoscape_elements(divisor: CFDivisor)[source]

Converts a CFDivisor object to a list of elements for Dash Cytoscape.

chipfiring.CFVisualizer._orientation_to_cytoscape_elements(orientation_obj: CFOrientation)[source]

Converts a CFOrientation object to a list of elements for Dash Cytoscape.

chipfiring.CFVisualizer.visualize(cf_object: any)[source]

Creates and runs a Dash app to visualize a chip-firing object.

Parameters:
  • cf_object – The chip-firing object (CFGraph, CFDivisor, CFOrientation).

  • debug – Whether to run the Dash app in debug mode.

Raises:

TypeError – If the object type is not supported for visualization.