-
Notifications
You must be signed in to change notification settings - Fork 47
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
Behaviour of DigraphRemoveEdge/DigraphRemoveEdges is inconsistent #260
Comments
For these kinds of functions, I'm all for the operation returning the identical unchanged immutable digraph in the case that the argument is immutable and the operation doesn't want to change the digraph in any way. I can't see why we should insist on creating on a new immutable copy in this case (which will take up new memory, and which will lose all of its stored attributes). If a user wants a new immutable copy, they can always ask for one explicitly. (I also think Any other opinions? |
Very late to the party, but I agree with @wilfwilson. If the digraph is not changed, then there's no need to copy it. |
This appears to also be the case for One related potential issue is in Example:
|
Currently if
digraph
is immutable:DigraphRemoveEdges(digraph, [ ])
returnsdigraph
, butDigraphRemoveEdges(digraph, [[src, ran]])
always returns an immutable copy ofdigraph
even when[src, ran]
is invalid, andDigraphRemoveEdge(digraph, [src, ran])
always returns an immutable copy ofdigraph
even when[src, ran]
is invalidwhich seems slightly odd, do we want this behaviour?
The text was updated successfully, but these errors were encountered: