Comments (5)
The former behaviour is correct; the latter is a bug.
That is: a Context should only refer to either a Node already in a graph or the node in the Context itself (for loops).
I'm finishing moving at the moment so I'll have a look at this once I've cleared enough space to set my computer up at home :p
from fgl.
Thanks. In the meantime, I have created a pull request to update the documentation (#28).
from fgl.
Closed in favour of #28
from fgl.
Is it a good idea to leave the bug in the code, and just document the bug in the line of issue #28?
from fgl.
Well, it's only a bug in the sense of fgl not throwing an error when this happens rather than silently doing losing information.
However, that would require either a) throwing an error (which is usually undesirable) or b) returning a Maybe
, which makes the code messier.
(I have heard of graph manipulation being akin to pointer arithmetic due to this nature: you either have good APIs and nice performance with lots of ways to throw errors/have unexpected behaviour, or else be really safe but with a horrible API and lots of checking slowing the code down.)
I think a warning of this behaviour in the documentation for &
(and potentially buildGr
) would suffice; at the very least it's probably the lesser of all the evils.
from fgl.
Related Issues (20)
- DynGraph contraint seems redundant in prettify
- GHC 9.4 compatibility
- Add tag for 5.8.1.0
- 5.8.1.0 crashes when computing dominators in graphs with unreachable nodes HOT 1
- fails to build with ghc-9.6 HOT 3
- Release tag for version 5.8.2.0 is missing HOT 1
- fgl and fgl-arbitrary need bumps for QuickCheck 2.10 and QuickCheck 2.11 HOT 2
- FLG doesn't build with MonadFailDesugaring HOT 4
- fgl-5.6.0.0 fails with ghc-8.6.1 HOT 10
- fgl and fgl-arbitrary incompatible with current QuickCheck
- Data.Graph.Inductive.Basic.undir appears to handle self-edges wrongly
- Data.Graph.Inductive.Query.TransClos.rc is wrongly implemented HOT 5
- Data/Graph/Inductive/NodeMap.hs:159:9-32: Non-exhaustive patterns in Just es' HOT 2
- gsel ignores edges to nodes HOT 1
- Add plain text synonym for `&`. HOT 2
- fgl-arbitrary on Hackage is extremely outdated. HOT 2
- `gfiltermap` can result in inconsistent graph. HOT 1
- Is the PatriciaTree matchGr too strict?
- Documentation updates for predicate functions that rely on match HOT 1
- The insMapEdge family of functions are partial HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fgl.