Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Edge classes to Edge, EdgeUndirected and EdgeDirected #178

Merged
merged 1 commit into from
Oct 5, 2019

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