#18751: Add test if a matroid is ternary
-------------------------------------+-------------------------------------
       Reporter:  Rudi               |        Owner:  Rudi
           Type:  enhancement        |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-6.8
      Component:  matroid theory     |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Rudi Pendavingh    |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/Rudi/ternary_matroid             |  032b0a0f52cac40e0d0b7378fc2bfefa390df15b
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by Rudi):

 Replying to [comment:14 yomcat]:
 > Replying to [comment:13 Rudi]:
 > > Argh, I really thought they were all gone.
 > If you use `git trac review 18751` it gives you all of them highlighted
 with nasty red squares. For me at least.
 > >
 > > Needs review again.
 > Happy with it. Just one question: If `M` is not ternary, then
 `M.ternary_matroid()` returns `None`, which appears to be a silent fail.
 Would an explicit error of some type be a better idea?

 It's a matter of preference, I guess. Returning None is not a fail, it's
 giving information, and the docstring is quite explicit about that. If you
 are not certain if the matroid is ternary, you can test the output of
 ternary_matroid. This way, you can get the answer and the possible
 certificate in one fell swoop. If you just want to test, use is_ternary.
 Similarly, M.isomorphism(N) will also output None if the matroids are not
 isomorphic and is_isomorphic just performs the test.

 To me, raising errors is what you do when something abnormal occurs. It is
 not abnormal that a matroid is not ternary.

--
Ticket URL: <http://trac.sagemath.org/ticket/18751#comment:15>
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.

Reply via email to