Opened 4 years ago

Closed 4 years ago

#19193 closed defect (fixed)

is_planar() fails with an immutable graph

Reported by: jmantysalo Owned by:
Priority: major Milestone: sage-6.9
Component: graph theory Keywords:
Cc: ncohen Merged in:
Authors: Jori Mäntysalo Reviewers: Nathann Cohen
Report Upstream: N/A Work issues:
Branch: 24280ff (Commits) Commit: 24280ff70f1b733a133b38e5e6bc6ea0d3fd90a8
Dependencies: Stopgaps:

Description

sage: Posets.ChainPoset(2).cover_relations_graph().is_planar()
True
sage: Posets.BooleanLattice(3).cover_relations_graph().is_planar()
 . . . ValueError: To relabel an immutable graph use inplace=False

Change History (7)

comment:1 Changed 4 years ago by jmantysalo

FYI: I was doing #19191 when I noticed this.

comment:2 Changed 4 years ago by jmantysalo

  • Summary changed from is_planar() tries to mutate an immutable graph to is_planar() fails with an immutable graph

Here is the same without reference to posets:

sage: G = graphs.PetersenGraph()
sage: G1 = G.copy(immutable=True)
sage: G1.is_planar()

--> Same ValueError.

comment:3 Changed 4 years ago by jmantysalo

  • Branch set to u/jmantysalo/is_planar___fails_with_an_immutable_graph

comment:4 Changed 4 years ago by jmantysalo

  • Commit set to 24280ff70f1b733a133b38e5e6bc6ea0d3fd90a8
  • Status changed from new to needs_review

Fixed.


New commits:

24280ffFix for is_planar() on immutable graphs.

comment:5 Changed 4 years ago by ncohen

  • Reviewers set to Nathann Cohen
  • Status changed from needs_review to positive_review

Okayokayyyyyyyyy. Thanks for the fix,

Nathann

P.S.: Please fill the 'author' field.

comment:6 Changed 4 years ago by jmantysalo

  • Authors set to Jori Mäntysalo

comment:7 Changed 4 years ago by vbraun

  • Branch changed from u/jmantysalo/is_planar___fails_with_an_immutable_graph to 24280ff70f1b733a133b38e5e6bc6ea0d3fd90a8
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.