#20253: bug in strongly connected test for static digraphs
--------------------------------+------------------------
Reporter: vdelecroix | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-7.2
Component: graph theory | Resolution:
Keywords: bug | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------+------------------------
Comment (by vdelecroix):
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 `CGraph` that are not initialized by `StaticSparseCGraph`. In
the current case it is `num_verts` (that is available as `self.g.n`) and
`num_arcs` (that is available as `self.g.m`). Adding at the end of
`__init__`.
{{{#!diff
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".
--
Ticket URL: <http://trac.sagemath.org/ticket/20253#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.