Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Checking if dual of matroid is graphic fails

I want to check whether the dual of a matroid is graphic. Here's a MWE:

G1 = Graph([[1, 2], [2, 3], [3, 4], [4, 5], [5, 1], [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]])

M1 = Matroid(G1) M2 = M1.dual()

M2.is_graphic()

This returns an error in the last line, saying that is_graphic is not defined for DualMatroids:

AttributeError: 'DualMatroid' object has no attribute 'is_graphic'

There should be a straightforward/standard way of solving this.

Checking if dual of matroid is graphic fails

I want to check whether the dual of a matroid is graphic. Here's a MWE:

  

G1 = Graph([[1, 2], [2, 3], [3, 4], 4], [4, 5], [5, 1], [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]])

6]]) M1 = Matroid(G1) Matroid(G1) M2 = M1.dual()

M2.is_graphic()

M1.dual() M2.is_graphic()

This returns raises an error in the last line, saying that is_graphic is_graphic is not defined for DualMatroids:DualMatroids:

AttributeError: 'DualMatroid' object
  object has no attribute 'is_graphic'

'is_graphic'

There should be a straightforward/standard way of solving this. this.

Checking if dual of matroid is graphic fails

I want to check whether the dual of a matroid is graphic. Here's a MWE:graphic.

Example:

 G1 = Graph([[1, 2], [2, 3], [3, 4], [4, 5], [5, 1],
             [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]])
M1 = Matroid(G1)
M2 = M1.dual()
M2.is_graphic()

This raises an error in the last line, saying that is_graphic is not defined for DualMatroids:

AttributeError: 'DualMatroid' object has no attribute 'is_graphic'

There should be a straightforward/standard way of solving this.