Skip to content

Conversation

@devansh2605
Copy link
Contributor

For issue - #863

I've added error validation to DigraphRemoveVertex(ices) and DigraphRemoveEdge(s) operations (both mutable and immutable versions). It now gives an error when trying to remove non-existent vertices or edges. I have also updated the tests which ignored or didnt take non- existent vertices or edges into consideration and have added new tests as well.

@mtorpey
Copy link
Collaborator

mtorpey commented Dec 3, 2025

This is failing due to tests that are now failing in the documentation examples. The examples that are failing are in oper.xml starting on line 716 and 800:

########> Diff in:
# /tmp/gaproot/pkg/Digraphs/doc/oper.xml:716
# Input is:
new := DigraphRemoveEdge(D, [25000, 2]);;
# Expected output:
# But found:
Error, the edge [25000, 2] does not exist,
########
########> Diff in:
# /tmp/gaproot/pkg/Digraphs/doc/oper.xml:716
# Input is:
new = D;
# Expected output:
true
# But found:
false
########
########> Diff in:
# /tmp/gaproot/pkg/Digraphs/doc/oper.xml:716
# Input is:
new := DigraphRemoveEdge(D, 2500, 2);;
# Expected output:
# But found:
Error, the edge [2500, 2] does not exist,
########
########> Diff in:
# /tmp/gaproot/pkg/Digraphs/doc/oper.xml:716
# Input is:
IsIdenticalObj(new, D);
# Expected output:
true
# But found:
false
########
# Running example 32   . . . msecs: 2
# Running example 33   . . . msecs: 84
########> Diff in:
# /tmp/gaproot/pkg/Digraphs/doc/oper.xml:764
# Input is:
new := DigraphRemoveEdges(D, [[1, 2], [2, 3], [3, 100]]);
# Expected output:
<mutable digraph with 250000 vertices, 249997 edges>
# But found:
Error, the edge [3, 100] does not exist,
########
########> Diff in:
# /tmp/gaproot/pkg/Digraphs/doc/oper.xml:764
# Input is:
new = D;
# Expected output:
true
# But found:
false
########

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants