Ask Your Question

Matroids: computing rank of a set

asked 2022-09-02 09:05:18 +0200


I would like to compute the rank of a given subset of the ground set of a matroid. I've tried

from sage.matroids.advanced import setprint
M = matroids.named_matroids.Vamos();

but I get the error

AttributeError: 'sage.matroids.circuit_closures_matroid.CircuitClos' object has no attribute 'rank_function'

Is there a way to go around this? Also, since I am very new to Sage: is the matroid package included in Sage by default or do I need to somehow install it? If yes, then how?

Thanks in advance!

edit retag flag offensive close merge delete


The matroid code is included in sage by default.

FrédéricC gravatar imageFrédéricC ( 2022-09-02 14:16:24 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2022-09-02 11:11:48 +0200

it's M.rank(['a','b','c'])

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2022-09-02 09:05:18 +0200

Seen: 96 times

Last updated: Sep 02 '22