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

getRepresentation -- retrieves stored representation

Description

For a matroid created from a matrix, this function provides a user-friendly way to access the original matrix. Similarly, for a matroid created from a (simple) graph, this function returns the graph used to create the matroid.

Note that some constructions applied to a matroid M (such as taking dual, or minors) will automatically compute an induced representation (if a representation of M exists), which can be viewed with this function.

i1 : A = random(QQ^3,QQ^5)

o1 = | 9/2 7/4  7/10 3/7 5/4  |
     | 9/4 7/9  7/3  6/7 2/9  |
     | 3/4 7/10 7    6   3/10 |

              3       5
o1 : Matrix QQ  <-- QQ
i2 : M = matroid A

o2 = a "matroid" of rank 3 on 5 elements

o2 : Matroid
i3 : A == getRepresentation M

o3 = true
i4 : K4 = completeGraph 4

o4 = Graph{0 => {1, 2, 3}}
           1 => {0, 2, 3}
           2 => {0, 1, 3}
           3 => {0, 1, 2}

o4 : Graph
i5 : M4 = matroid K4

o5 = a "matroid" of rank 3 on 6 elements

o5 : Matroid
i6 : getRepresentation M4 === K4

o6 = true
i7 : N = M / set{0}

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

o7 : Matroid
i8 : getRepresentation N

o8 = | 196/3083  111671/92490 1 0 |
     | 1057/3083 -9240/3083   0 1 |

              2       4
o8 : Matrix QQ  <-- QQ

See also

Ways to use getRepresentation:

  • getRepresentation(Matroid)

For the programmer

The object getRepresentation is a method function.


The source of this document is in Matroids/doc-Matroids.m2:2213:0.