#18485: Make function to generate *all* independent sets.
-------------------------------------+-------------------------------------
Reporter: Rudi | Owner: Rudi
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.8
Component: matroid theory | Resolution:
Keywords: | Merged in:
Authors: Rudi Pendavingh | Reviewers: Vincent Delecroix
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/Rudi/make_function_to_generate__all__independent_sets_|
a65c5de193bc872b707127ee8c21da3bedb0610f
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by Rudi):
Replying to [comment:37 vdelecroix]:
> - Why are you declaring your new functions as `cpdef` and not `def`?
Will they be called from Cython code?
>
The BasisExchangeMatroid method could be called from cython at some point,
and that function overrides the Matroid method. Is there a disadvantage to
declaring then cpdef?
> - Now, there are two very similar functions in
`basis_exchange_matroid.pyx`: `independent_r_sets` and `independent_sets`.
Could you at least make a reference to each other (ideally in a `..
SEEALSO` section). Similarly in `matroid.pyx` you have `bases`,
`independent_r_sets`, ...
>
OK.
> - (not necessarily for this ticket) The code in `independent_r_sets` and
`bases_count` is almost identical. Why not making `bases_count` more
general by allowing to count the cardinality of independent set and share
the code with `independent_r_sets`?
>
In BasisExchangeMatroid this is already the case. Andl I could also modify
Matroid, but right now that is not my top priority. We are talking about 6
lines of code here.
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=2bf2b04c7b353b4bdeca349fe5df4cdf0fdb4417
2bf2b04]||{{{added a cross reference}}}||
||[http://git.sagemath.org/sage.git/commit/?id=a65c5de193bc872b707127ee8c21da3bedb0610f
a65c5de]||{{{added another cross reference}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/18485#comment:39>
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.