Macaulay2 » Documentation
Packages » Matroids :: toSageMatroid
next | previous | forward | backward | up | index | toc

toSageMatroid -- Sage format for matroid

Synopsis

Description

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 =
     ['dfgh','cfgh','bfgh','afgh','degh','cegh','begh','aegh','bdgh','adgh',
     'bcgh','acgh','defh','cefh','befh','aefh','cdfh','bdfh','adfh','bcfh',
     'acfh','abfh','cdeh','bdeh','adeh','bceh','aceh','abeh','bcdh','acdh',
     'abdh','abch','defg','cefg','befg','aefg','cdfg','bdfg','adfg','bcfg',
     'acfg','abfg','cdeg','bdeg','adeg','bceg','aceg','abeg','bcdg','acdg',
     'abdg','abcg','bdef','adef','bcef','acef','bcdf','acdf','abdf','abcf',
     'bcde','acde','abde','abce','efgh'])
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.