#18972: twographs and Seidel switching
-------------------------------------+-------------------------------------
Reporter: dimpase | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.9
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers: Nathann Cohen
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/dimpase/seidelsw | 6bc5cbd678d6d9db6e99ff23489e0e1a720e8569
Dependencies: #18960, #18948, | Stopgaps:
#18988, #18991, #18986, #19018, |
#19019 |
-------------------------------------+-------------------------------------
Comment (by ncohen):
> Well, the rationale behind the current code is that someone who wants to
take the complement of a two-graph should just call `.complement()` rather
than something more complicated. And indeed, the complement of a two-graph
has a well-established meaning. It's more an implementation artefact that
the base class already has `complement()` defined, and it's not quite the
same. The user should not care about this IMHO.
I agree with everything you just said, but there is this other definition
above that is inherited, and we can't really change that definition either
for it would only apply to uniform hypergraphs...
I see only one way out: what would you think of making the *default* of
`.complement()` to only work for uniform hypergraphs? If we do that, then
the problem is solved in a more elegant way. Though `complement` would not
work for all instances but then, perhaps *that* is less surprising. And we
can make the exception "smart" to indicate that a keyword can change this
behaviour.
> Same was with `is_regular()`, but you didn't like this as it clashed
with the default, and I made it `is_regular_twograph()`.
I take this a bit differently: surely there is such a thing as a "regular
two-graph", but you can't work on hypergraphs and not know the other
definition, i.e. of 'regular hypergraph'. So to me, this is less
surprising and indeed something like `is_twograph_regular` can make sense.
A `twograph_complement` looks very odd, as the definition of complement
you need has nothing to do with twographs specifically.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18972#comment:85>
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.