.. _cpp-flow/Printer: ********************************************************** flow/Printer.hpp ********************************************************** .. default-domain:: cpp .. default-role:: cpp:expr .. py:currentmodule:: mod .. cpp:namespace:: mod Class ``flow::Printer`` -------------------------------------------------------------------------------------------------------------------------------- .. class:: flow::Printer An object of this class represents options for printing flow solutions. Synopsis ^^^^^^^^ .. alias:: flow::Printer :maxdepth: 2 :noroot: Details ^^^^^^^ .. cpp:namespace-push:: flow::Printer .. function:: dg::Printer &getDGPrinter() const dg::Printer &getDGPrinter() const :returns: a reference to the :class:`dg::Printer` used when printing flow solutions. .. function: void setWithFlowLabels(bool value) bool getWithFlowLabels() const Control whether or not a flow label is appended to each hyperedge label (see also :func:`Printer::pushEdgeLabel`). .. function:: void pushInEdgeLabel(std::function 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:`dg::Printer`. .. function:: void popInEdgeLabel() Remove the last pushed in-edge labelling function. :throws: :class:`LogicError` if no callback is left to pop. .. function:: void pushOutEdgeLabel(std::function 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:`dg::Printer`. .. function:: void popInOutEdgeLabel() Remove the last pushed out-edge labelling function. :throws: :class:`LogicError` if no callback is left to pop. .. function:: void setPrintUnfiltered(bool value) bool getPrintUnfiltered() const Control whether the unfiltered version of a solution is printed. .. function:: void setPrintFiltered(bool value) bool getPrintFiltered() const Control whether or not the filtered version of a solution is printed. .. function:: void setUnfilteredFlowColour(std::string value) std::string getUnfilteredFlowColour() const When printing the unfiltered version, use this colour on vertices and edges with non-zero flow. Use an empty string to not colour them. .. cpp:namespace-pop::