-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
bug in strongly connected test for static digraphs #20253
Comments
comment:1
I guess that there are much more methods that actually do not work. The thing is that there are uninitialized variables used by some of the methods in diff --git a/src/sage/graphs/base/static_sparse_backend.pyx b/src/sage/graphs/base/static_sparse_backend.pyx
index 06b19cf..2a98a96 100644
--- a/src/sage/graphs/base/static_sparse_backend.pyx
+++ b/src/sage/graphs/base/static_sparse_backend.pyx
@@ -95,6 +95,9 @@ cdef class StaticSparseCGraph(CGraph):
bitset_init(self.active_vertices, self.g.n+1)
bitset_set_first_n(self.active_vertices, self.g.n)
+ self.num_verts = self.g.n
+ self.num_arcs = self.g.m
+
def __dealloc__(self):
r"""
Freeing the memory But it looks like more a "work around" than a "real fix". |
comment:2
At least adding these lines at the end of the init method, with possibly other initialization, we ensure that all backends provide the same information. |
comment:3
There are other weird stuff
The thing is that it is not clear to me what attributes and methods should be implemented in a new backend. |
comment:4
Well, at least basic features like number of nodes and edges should be in all backends. |
This comment has been minimized.
This comment has been minimized.
Author: Vincent Delecroix |
Commit: |
Branch: u/vdelecroix/20253 |
comment:7
the patch is working well and passes but has one doctest error (I tried
certainly due to: David. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
That was it! Thanks. |
comment:10
why are you using notation |
comment:11
I did not change anything there. Just |
comment:12
ok, let it as is. |
Reviewer: David Coudert |
comment:13
Thanks! |
Changed branch from u/vdelecroix/20253 to |
The problem comes from bad initialization of some attributes in static sparse backend. We add two lines to fix this problem. We also deprecate four methods of
CGraph
to simplify its usage (namely_in_degree
,_out_degree
,_num_verts
,_num_arcs
).CC: @dimpase
Component: graph theory
Keywords: bug
Author: Vincent Delecroix
Branch/Commit:
dd0a55d
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/20253
The text was updated successfully, but these errors were encountered: