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

bases -- bases of matroid

Synopsis

Description

Returns a list of bases of the matroid. The basis elements are represented as sets of nonnegative integers, which are the indices of the elements in the ground set that make up a basis element. To get the subset of the ground set corresponding to a set of indices, use subscripts.

i1 : M = matroid({a,b,c,d},{{a,b},{a,c}})

o1 = a "matroid" of rank 2 on 4 elements

o1 : Matroid
i2 : bases M

o2 = {set {0, 1}, set {0, 2}}

o2 : List
i3 : M_((bases M)#0)

o3 = set {a, b}

o3 : Set

In this package, bases are the only structure that is always computed upon creation of a matroid. Additional invariants (such as the ideal or circuits) are not precomputed, but are cached after being computed once. This allows for maximum speed in methods that need to call the constructor function many, many times: e.g. tuttePolynomial and hasMinor.

See also

Ways to use bases :

For the programmer

The object bases is a method function.