Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlatsMatroid: improve validity check #39563

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gmou3
Copy link
Contributor

@gmou3 gmou3 commented Feb 22, 2025

More robust and faster is_valid method. Also, more efficient initialization when an iterable of flats is given.

A speed test with ~25% speedup:

sage: from sage.matroids.flats_matroid import FlatsMatroid
sage: M = FlatsMatroid(matroids.CompleteGraphic(8))
sage: %timeit M.is_valid()

Includes minor refactoring in CircuitsMatroid class.

Copy link

Documentation preview for this PR (built with commit f3ac4d8; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant