#13721: Additional tests for graph symmetries and an improvement of
is_vertex_transitive
----------------------------------+-----------------------------------------
Reporter: azi | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.6
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jernej Azarija | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Changes (by ncohen):
* status: needs_review => needs_work
Comment:
Helloooooooooo Jernej ! I loooooooooooooove this patch, thank you so much
for working on it ! `:-D`
Several comments :
* You make useless copies of the graph. The purpose of these two lines
{{{
G = self.relabel(T,inplace=False)
e = list(G.edges(labels=False)[0])
}}}
is just to get ONE edge of the graph with 0...n-1 coordinates !! To do
this, you copy the whole graph with the first line, get the list of ALL
EDGES in the second line, and ignore them all to only get the first of
them. What's the point ? You can get the same result with this :
{{{
e = self.edge_iterator(labels = False).next()
e = T[e[0]], T[e[1]]
}}}
* You can replace
{{{
if not self.is_eulerian():
return False
return self.is_edge_transitive() and self.is_vertex_transitive() and not
self.is_arc_transitive()
}}}
by
{{{
return self.is_eulerian() and self.is_edge_transitive() and
self.is_vertex_transitive() and not self.is_arc_transitive()
}}}
Or rather (to make it easier to read) :
{{{
return (self.is_eulerian() and
self.is_edge_transitive() and
self.is_vertex_transitive() and
not self.is_arc_transitive())
}}}
(and the same goes for `is_semi_symmetric`).
* The documentation of `is_half_transitive` and `is_semi_symmetric`
appears to be wrong. When you have a `::` somewhere, what should follow is
an indented block of Sage code. And the result should appear nicely in the
output of `sage -docbuild reference html` (that's the point of these `::`
commands).
* Your functions are added to the file `generic_graph.py` which means that
they will also be methods of `DiGraphs` objects. Could you add to the
docstring of `is_edge_transitive` and `is_arc_transitive` an explanation
of their meaning when `self` is a DiGraph ? The expected meaning of
`is_edge_transitive` for DiGraphs is actually the one obtained by
`is_arc_transitive`. Or do you think that `is_edge_transitive` should only
be a method of `Graph` ?
Thank you again for this patch ! I'll be glad to see it in Sage `:-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13721#comment:17>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.