-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add overview of functionality/performance for different graph transfo… #64
base: main
Are you sure you want to change the base?
Conversation
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"time" -> "time and memory"
| HigherKinded.Class | `O(s)` | `O(s)` | | ||
| IntAdjacencyMap | `O(log(n))` | `O(s)` | | ||
| NonEmpty | `O(s)` | ` ` | | ||
| Relation | `O(n+m)`| ` ` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
|
||
**`removeVertex`**: Removes a vertex from a given graph. In `NonEmpty` graphs, returns `Nothing` if the resulting graph is empty. | ||
|
||
| removeVertex | Time | Memory | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first header here should probably be Data type
instead of removeVertex
(same for other tables).
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"AdjacencyMap
" -> "graph".
@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. |
…rmations in doc
See issue #12