#14619: Test if a graph is distance-regular
---------------------------------+----------------------------------
Reporter: ncohen | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.12
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: Nathann Cohen | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------+----------------------------------
Comment (by ncohen):
Yoooooooooooooo !!
> * needs to be rebased (HUNK)
Done !
> * a typo in the doc `;;` instead of `::`
Done !
> * the function does not give the correct result for the connected graph
with 2 vertices
Done ! It was enough to change the `<= 2` to a `<= 1` in the beginning
`;-)`
> * you should say in the doc that distance-regular means '''regular''' +
the distance condition
Well, regularity is implied by distance regularity, for if a graph is
distance-regular all vertices have "the same number of vertices at
distance 1" (i.e. neighbors). I made that clear in an additional sentence
of documentation.
> * missing spaces before and after `==`
Fixed. In the whole file.
I also noticed that there was an ugly segfault produced when the graph was
disconnected. In this case, the "distance" between the two vertices is
reported as 65536, but I try to write that in a the 65536th cell of a C
array that may be much shorter. I began to write a proper fix to only run
this method on connected graphs, and the method would have called itself
on each connected component if the graph was not connected from the
beginning, but I gave up this approach as it wouldd have added 15 lines of
"details" to a code which isn't that clear already. Hence I chosed the
lazy approach, which thanks to branch prediction in our CPU may not be
that bad.
And it can be changed, if this is a problem later on.
Here it is ! Former rebased patch, and the answer to your remarks.
Thaaaaaaaaaanks !
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/14619#comment:16>
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.