Skip to content

Conversation

@clue
Copy link
Member

@clue clue commented Oct 5, 2019

The new API is now much more consistent and explicit:

// old
assert($v1->createEdge($v2) instanceof Graphp\Graph\Edge\Undirected);
assert($v1->createEdgeTo($v2) instanceof Graphp\Graph\Edge\Directed);
assert($edge instanceof Graphp\Graph\Edge\Base);

// new
assert($graph->createEdgeUndirected($v1, $v2) instanceof Graphp\Graph\EdgeUndirected);
assert($graph->createEdgeDirected($v1, $v2) instanceof Graphp\Graph\EdgeDirected);
assert($edge instanceof Graphp\Graph\Edge);

Builds on top of #175 and #166

@clue clue added this to the v1.0.0 milestone Oct 5, 2019
@clue clue merged commit fb198e4 into graphp:master Oct 5, 2019
@clue clue deleted the edgy branch October 5, 2019 15:29
clue added a commit to clue-labs/graphviz that referenced this pull request Jan 8, 2020
clue added a commit to clue-labs/algorithms that referenced this pull request Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant