next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Matroids :: toSageMatroid

toSageMatroid -- Sage format for matroid



This method returns a string which can be recognized as a matroid in the Sage matroids package.

Currently this function is purely for demonstrative purposes, using lowercase alphabet letters for the ground set (thus limited to matroids on <= 26 elements), and using a basis description.

The inverse functionality is provided by the function fromSageMatroid.

i1 : V = specificMatroid "vamos"

o1 = a matroid of rank 4 on 8 elements

o1 : Matroid
i2 : s = toSageMatroid V

o2 = Matroid(groundset = 'abcdefgh', bases =
i3 : class s

o3 = String

o3 : Type
i4 : fromSageMatroid s === V

o4 = true

Ways to use toSageMatroid :

For the programmer

The object toSageMatroid is a method function.