-
Notifications
You must be signed in to change notification settings - Fork 235
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
Use of == in Graphs #2262
Comments
This may be because the vertex set is build using
Could someone propose another way to build the cartesian product of two |
You could use By the way, it's strange that Also, the illegal use of cartesianProduct(Graph, Graph) := Graph => (G, H) -> (
V := toList(set vertexSet G ** set vertexSet H);
E := flatten for u in V list for v in V list
if (u_0 == v_0 and member(set {u_1, v_1}, edges H))
or (u_1 == v_1 and member(set {u_0, v_0}, edges G))
then {u, v} else continue;
graph(V, E, EntryMode => "edges")
) |
fchapoton
added a commit
to fchapoton/M2
that referenced
this issue
Aug 22, 2022
trying to fix Macaulay2#2262
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example of a problem with the
Graphs
package:The issue is,
cartesianProduct
tries to compare vertex labels with==
. This is problematic since vertex labels can be anything (in the help, both symbols like a,b,c and numbers 1,2,3 are used).I suspect
===
should be used. There are I believe quite a few other functions defined inGraphs
that suffer from the same problem.The text was updated successfully, but these errors were encountered: