#19517: Graphs: canonical_label() and return_graph -parameter
--------------------------------+-------------------------
Reporter: jmantysalo | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.10
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------+-------------------------
Comment (by ncohen):
> There is something strange with `bliss` installation, see
https://groups.google.com/forum/#!topic/sage-devel/_1OYNuVNltM
Something like that happened during the last update of bliss, but Jeroen
noticed it at the last minute:
http://trac.sagemath.org/ticket/19483#comment:15
> `return_graph` is not converse of `inplace`. I guess. It is badly
documented. What is the meaning of it's output?
(assuming that you are talking of 'canonical_label')
`return_graph` tells whether or not you want the actual graph. Somethimes
you only need the labelling, and not the whole graph.
A list of pairs somehow... Try
>
> {{{
> G = graphs.PetersenGraph()
> G.relabel(lambda x: chr(ord('a')+x))
> G.canonical_label(return_graph=False)
> }}}
These pairs are the edges of the relabeled graph
{{{
sage: Graph(G.canonical_label(return_graph=False)) ==
graphs.PetersenGraph().canonical_label()
True
}}}
Can't say that I see the point to return this instead of a `Graph`
object...
> And why it deletes vertex positioning contraty to `relabel`? Try for
example
Probably because the graph is built from the list of edges, instead of
being built as a relabelled copy of the original graph. Why do you ask
these questions like there is a mystical explanation behind? It's a bug,
that's all. It just needs to be fixed.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/19517#comment:3>
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/d/optout.