.. _py-flow/Printer: ********************************************************** flow/Printer ********************************************************** .. default-domain:: py .. py:currentmodule:: mod .. cpp:namespace:: mod .. class:: FlowPrinter An object of this class holds information on how derivation graphs with flow are visualised. .. attribute:: dgPrinter (Read-only) Retrieve the :class:`DGPrinter` used when printing solutions. :type: DGPrinter .. attribute:: withFlowLabels Control whether or not a flow label is appended to each hyperedge label (see also :meth:`DGPrinter.pushEdgeLabel`). :type: bool .. method:: pushInEdgeLabel(f) Add another function for in-edge labelling. The result of this function is appended to each label using the edge label separator of the underlying :class:`DGPrinter`. :param f: the function to push for labelling in-edges. :type f: Callable[DGVertex], str] or str .. method:: popInEdgeLabel() Remove the last pushed in-edge labelling function. :raises: :class:`LogicError` if no callback is left to pop. .. method:: pushOutEdgeLabel(f) Add another function for out-edge labelling. The result of this function is appended to each label using the edge label separator of the underlying :class:`DGPrinter`. :param f: the function to push for labelling out-edges. :type f: Callable[DGVertex], str] or str .. method:: popOutEdgeLabel() Remove the last pushed out-edge labelling function. :raises: :class:`LogicError` if no callback is left to pop. .. attribute:: printUnfiltered Control whether or not the unfiltered version of a solution is printed. :type: bool .. attribute:: printFiltered Control whether or not the filtered version of a solution is printed. :type: bool .. attribute:: 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