#14666: Test if a weight function is generic for a given matroid
-------------------------------------+-------------------------------------
Reporter: Stefan | Owner: Stefanf
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-7.2
Component: matroid theory | Resolution:
Keywords: matroid, weight | Merged in:
function | Reviewers: Darij Grinberg
Authors: Tara Fife | Work issues:
Report Upstream: N/A | Commit:
Branch: | 4031e326dcdf7a40072483267f45362bf2f88709
public/ticket/14666 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by tara):
Replying to [comment:42 darij]:
> Oh! But then you should not be claiming that the two methods are doing
the same thing. I changed the methods to achieve precisely this effect.
When I execute the following code, using the current version, I get `True`
and then `False`. We should expect `True` in both cases, because `{3,4}`
is the only maximum weighted basis of `M`.
{{{
from sage.matroids.advanced import setprint
M=matroids.Uniform(2,5)
wt={0: 1, 1: 1, 2: 1, 3: 2, 4: 2}
M.is_max_weight_independent_generic(weights=wt)
M.dual().is_max_weight_coindependent_generic(weights=wt)
}}}
However, when I change those two lines back, I get `True` for both
outputs. Furthermore, the code in `is_max_weight_coindependent_generic`
looking the same as `is_max_weight_independent_generic`, excepting that
`rank` is changed to `corank` makes intuitive sense to me.
--
Ticket URL: <http://trac.sagemath.org/ticket/14666#comment:43>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.