#15622: Immutable graphs must not be relabeled
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_work
Type: | Milestone: sage-6.1
defect | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: | Commit:
Authors: | 529f7850c111c19522a8f18f9ce829e1e3a5b769
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/15622 |
Dependencies: |
#15619 |
-------------------------+-------------------------------------------------
Comment (by SimonKing):
Replying to [comment:10 ncohen]:
> I don't get what the "obvious change from `StaticSparseCGraph` into
`StaticSparseBackend`" could be `O_o`
{{{
#!diff
diff --git a/src/sage/graphs/base/static_sparse_backend.pyx
b/src/sage/graphs/base/static_sparse_backend.pyx
index 9b5a8fe..e5b889e 100644
--- a/src/sage/graphs/base/static_sparse_backend.pyx
+++ b/src/sage/graphs/base/static_sparse_backend.pyx
@@ -417,12 +417,12 @@ class StaticSparseBackend(CGraphBackend):
TEST::
- sage: from sage.graphs.base.static_sparse_backend import
StaticSparseCGraph
- sage: g = StaticSparseCGraph(graphs.PetersenGraph())
+ sage: from sage.graphs.base.static_sparse_backend import
StaticSparseBackend
+ sage: g = StaticSparseBackend(graphs.PetersenGraph())
sage: g.relabel([],True)
Traceback (most recent call last):
...
- ValueError: Thou shalt not remove a vertex from an immutable
graph
+ ValueError: Thou shalt not relabel an immutable graph
"""
raise ValueError("Thou shalt not relabel an immutable graph")
}}}
`StaticSparceCGraph` simply is the wrong class.
--
Ticket URL: <http://trac.sagemath.org/ticket/15622#comment:11>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.