-
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
Improve documentation for edge-labelled graphs (maybe write a paper?) #175
Comments
We expect the type of edge labels to be at least a monoid, and the identity element of this monoid corresponds to the non-edge. You can therefore implement noEdge :: (Monoid e, Eq e) => e -> Bool
noEdge e = (e == mempty) There is a recent talk that should clarify this: https://skillsmatter.com/skillscasts/12361-labelled-algebraic-graphs Admittedly, this needs to be documented much better. I haven't yet managed to write this up. |
I tried to watch the video but it cannot be played because of "privacy issues".
Another question I have is how do you express a - b - c, because if connect behaves like join then in `Connect True a (Connect True b c)` a should be connected both to b and c.
5. 3. 2019 3:33 AM, 3:33 AM, Andrey Mokhov <[email protected]> napsal/a:
…We expect the type of edge labels to be at least a monoid, and the
identity element of this monoid corresponds to the non-edge. You can
therefore implement `noEdge`:
```haskell
noEdge :: (Monoid e, Eq e) => e -> Bool
noEdge e = (e == mempty)
```
There is a recent talk that should clarify this:
https://skillsmatter.com/skillscasts/12361-labelled-algebraic-graphs
Admittedly, this needs to be documented much better. I haven't yet
managed to write this up.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#175 (comment)
|
@Josef-Vonasek Strange, I just tried and it worked fine for me. It does require you to login though, e.g. using the GitHub account.
If we take the Boolean monoid with |
@snowleopard Quite intriguing! Let me know if I can help :-) |
@adithyaov If your acyclic graphs project succeeds, it may lead to some publishable results. Going through existing literature and writing an overview of existing approaches would be a good start. |
Just adding a note about another issue with the documentation: right now it's not clear that in most cases we require the type of edges to be a commutative and idempotent monoid. For arbitrary monoids like |
The current API of labeled graphs does not seem to capture the notion of disconnected components well.
For example for
Graph Bool String
, both False / True and True / False can denote the lack of and the existence of an edge, respectively.Therefore algorithms like
shortestPath
would require extra parameternoEdge : label -> Bool
.The text was updated successfully, but these errors were encountered: