#15864: Graph.is_distance_regular is awfully wrong
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_review
Type: | Milestone: sage-6.2
defect | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: | Commit:
Authors: | f6541444499809d3af167c9a3632baa98449b0f2
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/15864 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Yooooooooo !
> is terribly confusing to the user. Indeed, ```is_distance_regular``` is
meant to return True or False, just like any other ```is_blahbla``` member
functions are.
Well. Not exactly "all" `:-P`
I did this quite quite often in the graph code, in order to avoid having
to create three functions for every feature : one which returns
True/False, one which returns a certificate, and a hidden one which
returns both. Besides it is weird to call a function which is meant to
return a certificate when you do not even know if the graph is distance-
regular or not, and there is a risk that users would call BOTH functions
(first boolean check THEN certificate) and so compute everythin twice.
> There should be a member function named something like
```distance_regularity_parameters``` which would return the parameters
(what it returns for a non-distance-regular graph, is open to discussion -
e.g. it can even return lists of all the different values, or empty
entries for the values which are not-constant.
Well... It's the usual way to do stuff, but with Python we do not really
have to follow this limitation as there is no return type... `is_perfect`
can ive you an odd hole/antihole, `is_forest` returns cycles, `is_planar`
gives you a K5/K33 minor. Really, it's cool `:-P`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15864#comment:4>
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.