3.2.13.4. flow/Printer.hpp

3.2.13.4.1. Class flow::Printer

class flow::Printer

An object of this class represents options for printing flow solutions.

3.2.13.4.1.1. Synopsis

dg::Printer &getDGPrinter()
const dg::Printer &getDGPrinter() const
void pushInEdgeLabel(std::function<std::string(dg::DG::Vertex)> f)
void popInEdgeLabel()
void pushOutEdgeLabel(std::function<std::string(dg::DG::Vertex)> f)
void popInOutEdgeLabel()
void setPrintUnfiltered(bool value)
bool getPrintUnfiltered() const
void setPrintFiltered(bool value)
bool getPrintFiltered() const
void setUnfilteredFlowColour(std::string value)
std::string getUnfilteredFlowColour() const

3.2.13.4.1.2. Details

dg::Printer &getDGPrinter()
const dg::Printer &getDGPrinter() const
Returns

a reference to the dg::Printer used when printing flow solutions.

void pushInEdgeLabel(std::function<std::string(dg::DG::Vertex)> 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 dg::Printer.

void popInEdgeLabel()

Remove the last pushed in-edge labelling function.

Throws

LogicError if no callback is left to pop.

void pushOutEdgeLabel(std::function<std::string(dg::DG::Vertex)> 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 dg::Printer.

void popInOutEdgeLabel()

Remove the last pushed out-edge labelling function.

Throws

LogicError if no callback is left to pop.

void setPrintUnfiltered(bool value)
bool getPrintUnfiltered() const

Control whether the unfiltered version of a solution is printed.

void setPrintFiltered(bool value)
bool getPrintFiltered() const

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

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.