3.1.10.3. flow/Printer

3.1.10.3.1. Class FlowPrinter

class mod.FlowPrinter

An object of this class holds information on how derivation graphs with flow are visualised.

dgPrinter

(Read-only) Retrieve the DGPrinter used when printing solutions.

Type

DGPrinter

withFlowLabels

Control whether or not a flow label is appended to each hyperedge label (see also DGPrinter.pushEdgeLabel()).

Type

bool

pushInOutEdgeLabel(f)

Add another function for in-/out-edge labelling. The result of this function is appended to each label using the edge label separator of the underlying DGPrinter. The last argument given to the function is True for the in-edge, and False for the out-edge.

Parameters

f (Callable[[Graph, DG, bool], str] or str) – the function to push for labelling in-/out-edges.

popInOutEdgeLabel()

Remove the last pushed in/out edge labelling function.

printUnfiltered

Control whether or not the unfiltered version of a solution is printed.

Type

bool

printFiltered

Control whether or not the filtered version of a solution is printed.

Type

bool

unfilteredFlowColour

When printing the unfiltered version, use this colour on vertices and edges with non-zero flow. Use an empty string to not colour them.

Type

str