private function getEdgeDump(Edge $edge)
{
$ret = get_class($edge) . ' ';
if ($edge instanceof Directed) {
$ret .= $edge->getVertexStart()->getId() . ' -> ' . $edge->getVertexEnd()->getId();
} else {
$vertices = $edge->getVertices()->getIds();
$ret .= $vertices[0] . ' -- ' . $vertices[1];
}
$ret .= PHP_EOL . 'flow: ' . $edge->getFlow();
$ret .= PHP_EOL . 'capacity: ' . $edge->getCapacity();
$ret .= PHP_EOL . 'weight: ' . $edge->getWeight();
$ret .= PHP_EOL . 'attributes: ' . json_encode($edge->getAttributeBag()->getAttributes());
return $ret;
}