Add overview of functionality/performance for different graph transfo…#64
Open
mateoatr wants to merge 1 commit intosnowleopard:mainfrom
Open
Add overview of functionality/performance for different graph transfo…#64mateoatr wants to merge 1 commit intosnowleopard:mainfrom
mateoatr wants to merge 1 commit intosnowleopard:mainfrom
Conversation
snowleopard
reviewed
May 4, 2018
| @@ -0,0 +1,83 @@ | |||
| This documents intends to give an overview of the time complexity of the different graph transformations implemented by the various data types existent in Alga. | |||
snowleopard
reviewed
May 4, 2018
| | HigherKinded.Class | `O(s)` | `O(s)` | | ||
| | IntAdjacencyMap | `O(log(n))` | `O(s)` | | ||
| | NonEmpty | `O(s)` | ` ` | | ||
| | Relation | `O(n+m)`| ` ` | |
Owner
There was a problem hiding this comment.
You didn't cover Graph in this table -- is this because the implementation simply reuses HigherKinded.Class.removeVertex?
I think it would be nice to have an entry for Graph as well, since at some point we might change the implementation and it will no longer rely on HigherKinded.Class.
snowleopard
reviewed
May 4, 2018
|
|
||
| **`removeVertex`**: Removes a vertex from a given graph. In `NonEmpty` graphs, returns `Nothing` if the resulting graph is empty. | ||
|
|
||
| | removeVertex | Time | Memory | |
Owner
There was a problem hiding this comment.
The first header here should probably be Data type instead of removeVertex (same for other tables).
snowleopard
reviewed
May 4, 2018
| | NonEmpty | `O(s)` | `O(s)` | | ||
| | Relation | `O(log(m))` | ` ` | | ||
|
|
||
| **`replaceVertex`**: Replaces a vertex `x` with a vertex `y` in a given `AdjacencyMap`. If `y` already exists, `x` and `y` will be merged. |
Owner
|
@mateoatr Many thanks for the PR! I've added a couple of comments above. Also two general comments:
I haven't yet checked the complexity bounds themselves -- will do that soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…rmations in doc
See issue #12