cottax.consumers.visualization.xdsm_struct module

The XDSM’s struct: what a drawing of a graph says, in plain names, and its rings and key.

key_entries(struct: dict, sty: Style)[source]

The key of one XDSM: each problem type drawn, each depth of solve ring, a block run in order where the style draws one, and a ring no driver answers, each once, as key_entry writes one, with the class the figure draws it in.

Return type:

list[dict]

ring_class(kind: str, depth: int)[source]

The CSS class a ring is drawn with: a solve’s by its depth (group-nested below the top), a block run in order group-ff at every depth.

Return type:

str

ring_text(kind: str, depth: int)[source]

What a key entry says of a ring; past RING_TEXT, solved <depth> levels in.

Return type:

str

xdsm_struct(graph: NestingGraph | ExecutableGraph | Plan, *, blocks: bool | ExecutableGraph = False, formatter: Formatter = PlainFormat(), problem_first: bool = True)[source]

What an XDSM of graph says, in plain names: every step and variable keyed by its plain spelling (spell_plain); two spelled alike are refused (SpelledAlike).

blocks: ring every solve and rebind the diagonal into run order (sequencing.ordered_graph); an ExecutableGraph rings as that proof has it. formatter: how each name is shown (shown_steps, shown_vars). problem_first: a problem at the head of its block (problems_first); off keeps the graph’s order.

Keys: steps (the diagonal), reads / writes (step to variables), producer (variable to its step; a read with none is a boundary input), shown_steps / shown_vars ((markup, mark) per name), problem_types (a condition node to its category’s name, ‘stated’ without one), stated_shapes (a requirement to the category it will take), driven (the driven steps), kinds (each category present, its Kind); when present, slots (a condition node’s slots, (label, reads) each), step_groups (step to its enclosing name, as the N2 groups it) and blocks (one record per ring, outermost first: steps, ring ‘solve’ or ‘run’, depth, type).

Return type:

dict