pyquibbler.quib_network.dependency_graph
- pyquibbler.quib_network.dependency_graph(focal_quib: Quib, direction: None | str | Direction = None, depth: int | None = None, reverse_depth: int | None = 0, bypass_intermediate_quibs: bool = True) Box
Draw a network of quibs
Trace a focal quib upstream, downstream or in both directions and draw a network of dependent quibs.
- Parameters:
focal_quib (Quib) – The focal quib around which to extend the network.
direction (Direction or {'upstream', 'downstream', 'both', 'all'}) –
Determines how to expand the network from the focal_quib
'upstream'
: expand upstream to quibs that affect the focal quib.'downstream'
: expand downstream to quibs affected by the focal quib.'both'
: interdependently expand both upstream and downstream (default)'all'
: expand in both direction simultaneously, returning all the quibs connected to the focal quib.
See example in the figure above.
depth (int or None) – The number of steps of network extension. None for infinity (default).
reverse_depth (int or None) –
The number of steps to extend network in the reverse direction.
None
for infinity;0
do not reverse (default).When
direction='downstream'
, settingreverse_depth > 0
is helpful to understand what other parameters affect what the focal quib is affecting.When
direction='upstream'
, settingreverse_depth > 0
is helpful to understand what other results are affected by the parameters that affect the focal quib.bypass_intermediate_quibs (bool, default: True) – Intermediate quibs are defined as unnamed and non-graphics quibs (
assigned_name=None
andis_graphics=False
), typically representing intermediate calculations.
- Returns:
An ipycytoscape.Box containing the legend and the quib network widgets.
- Return type:
ipywidgets.Box
See also
Direction
,get_parents
,get_children
,get_ancestors
,get_descendants