-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Immutable directed graphs should know that they are directed #15810
Comments
comment:1
Variation of the theme:
|
comment:2
PS: In that case, |
comment:3
That's because in Nathann |
comment:4
Replying to @nathanncohen:
So, easy to fix, then? What are the dependencies of this ticket? Actually, the error with the master branch is as in comment:1, whereas I get the error shown in the ticket description with a different branch (develop?). |
Branch: u/SimonKing/ticket/15810 |
Dependencies: #15623 |
Commit: |
Author: Simon King |
comment:8
There is more than this one type "_directed --> directed" to fix. |
comment:9
Arg... I was uploading mine Nathann |
comment:10
NOnonono it's not this one that should be changed. Give me a second. Nathann |
comment:11
WTF????? When I generally replace _directed by directed for static graph backend, I get numerous errors!! |
comment:12
Replying to @nathanncohen:
Why not? It fixes it. |
comment:13
With my branch, all tests in sage.graphs pass. So, what's the problem? |
comment:14
The file Nathann |
comment:15
No problem with SparseGraph backends ? Then I don't get it either. Nathann |
comment:16
Replying to @nathanncohen:
Apparently:
|
comment:17
Replying to @nathanncohen:
Did you not fix something of this kind in #15623 (which is a dependency)? |
comment:18
No idea It's merged anyway, so what's the point ? I'm trying to find out why your branch works while I thought it wouldn't. Nathann |
comment:24
Yeah, the Nathann |
comment:25
Replying to @nathanncohen:
OK. Will your branch include #15623 (i.e., more than master)? |
comment:26
Well.... It will be based on develop, and include nothing else. Nathann |
comment:27
By the way if you use the dev scripts and if they use the master branch as a default then that's probably a bug that should be fixed. Could you write to sage-git if that's the case ? Nathann |
comment:28
What do you think of the current public/15810 ? It removes the ugly definition of Nathann |
comment:29
Replying to @nathanncohen:
Can you remind me how to obtain that branch and how to set the default location for pushing a commit? |
comment:30
git fetch trac I do not know if it is what you ask with your second question, but Nathann |
comment:31
Thank you! Simon |
comment:32
Is the purpose of this ticket to remove the confusion between |
comment:33
Where ?
How simple can it get ? We only store this boolean 3 times, and probably have as many functions that only return its value Nathann |
comment:34
versus
|
comment:35
PS: There are numerous hits for both directed and _directed in .py files, too. |
comment:36
Oh. Looks like the CGraph do not insist on having a |
comment:37
I updated the branch with a new commit. I set it as this ticket's branch so that you can see it more easily. The only Nathann New commits:
|
Changed branch from u/SimonKing/ticket/15810 to public/15810 |
comment:38
Could you elaborate why you remove one line in the following chunks, rather than replace diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py
index f869bb0..d95e96e 100644
--- a/src/sage/graphs/digraph.py
+++ b/src/sage/graphs/digraph.py
@@ -919,7 +919,6 @@ class DiGraph(GenericGraph):
self._weighted = weighted
self.allow_loops(loops, check=False)
self.allow_multiple_edges(multiedges, check=False)
- self._backend.directed = True
else:
raise NotImplementedError("Supported implementations: networkx, c_graph.")
diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
index a3f1dcd..4d15305 100644
--- a/src/sage/graphs/graph.py
+++ b/src/sage/graphs/graph.py
@@ -1542,7 +1542,6 @@ class Graph(GenericGraph):
self._weighted = weighted
self.allow_loops(loops, check=False)
self.allow_multiple_edges(multiedges, check=False)
- self._backend.directed = False
else:
raise NotImplementedError("Supported implementations: networkx, c_graph.") |
comment:39
Because several lines above those two lines, And well, setting the value of a private variable of the backend is the backend's constructor's job. So this way, the constructors of !Graph and DiGraph do not mess with what they should not touch, the value of Nathann |
comment:40
Replying to @nathanncohen:
OK. Then, provided tests pass, it will be positive review. |
comment:41
Thank you, Nathann! Simon |
Changed author from Simon King to Nathann Cohen |
Reviewer: Simon King |
comment:42
Thanks for the review Nathann |
Changed branch from public/15810 to |
* develop: (58 commits) Updated Sage version to 6.2.beta2 fix doctest error Limit the GAP command line history integrate better with Integer.is_prime Combine ECM-GMP with Baillie-PSW for prime factorization Cleaned up documentation and formatting. add doctesr Trac 15262: fix combine function trac sagemath#15810: The graph data structures may have a ._directed but no .directed ignore randomness in assertion trac sagemath#15810: Immutable directed graphs should know that they are directed Trac 15166: regression test Fix representation of RIF elements with large exponent docbuilding: suppress warnings during latex build workaround for the utf8 code points in the Sage banner Trac 15798: fix mwrank doctest for Solaris do not abbreviate 3.99999... to 3.99 with # abs tol 1e-2 setuptools: export PYTHON_EGG_CACHE and silence a warning about it Remove .hgignore files PARI: fix pow, mod and shift operators ...
Bug:
Depends on #15623
CC: @nathanncohen
Component: graph theory
Keywords: immutable directed graph
Author: Nathann Cohen
Branch/Commit:
d6ca86c
Reviewer: Simon King
Issue created by migration from https://trac.sagemath.org/ticket/15810
The text was updated successfully, but these errors were encountered: