graphp / graph

GraPHP is the mathematical graph/network library written in PHP.
MIT License
694 stars 74 forks source link

Remove edge cloning alias methods, use Graph instead #177

Closed clue closed 5 years ago

clue commented 5 years ago
// old (removed alias methods)
$new = $edge->createEdgeClone();
$inverted = $edge->createEdgeCloneInverted();

// new (already supported before)
$new = $graph->createEdgeClone($edge);
$inverted = $graph->createEdgeCloneInverted($edge);

// old (rarely used)
$walkGraph = $walk->createGraph();

// new (already supported before)
$walkGraph = $graph
    ->createGraphCloneEdges($walk->getEdges())
    ->createGraphCloneVertices($walk->getVertices());

Builds on top of #175