Opened 8 years ago

Closed 7 years ago

#8913 closed defect (fixed)

S.cayley_graph(side = "twosided") returns broken labels

Reported by: nthiery Owned by: nthiery
Priority: major Milestone: sage-4.4.4
Component: algebra Keywords: cayley graph
Cc: sage-combinat, rbeezer Merged in: sage-4.4.4.alpha0
Authors: Nicolas M. Thiéry Reviewers: Rob Beezer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This patch reinstates appropriate labeling of the edges for two sided cayley graphs::

   sage: S = FiniteSemigroups().example(alphabet=('a','b'))
   sage: g = S.cayley_graph(side="twosided")
   sage: g.edges()
   [('a', 'a', (0, 'left')), ('a', 'a', (0, 'right')), ('a', 'ab', (1, 'right')), ('a', 'ba', (1, 'left')), ('ab', 'ab', (0, 'left')), ('ab', 'ab', (0, 'right')), ('ab', 'ab', (1, 'right')), ('ab', 'ba', (1, 'left')), ('b', 'ab', (0, 'left')), ('b', 'b', (1, 'left')), ('b', 'b', (1, 'right')), ('b', 'ba', (0, 'right')), ('ba', 'ab', (0, 'left')), ('ba', 'ba', (0, 'right')), ('ba', 'ba', (1, 'left')), ('ba', 'ba', (1, 'right'))]

This was inadvertently broken by #8044 which discarded the left / right info.

Attachments (1)

trac_8913-cayley_graph_twosided_labels-nt.patch (2.1 KB) - added by nthiery 8 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by nthiery

  • Keywords cayley graph added
  • Status changed from new to needs_review

comment:2 Changed 8 years ago by nthiery

  • Cc rbeezer added

comment:3 Changed 8 years ago by rbeezer

  • Reviewers set to Rob Beezer

Looks good. Running tests now.

comment:4 follow-up: Changed 8 years ago by rbeezer

  • Status changed from needs_review to positive_review

Looks good (including the addition of a new doctest for this situation).

Applies, builds, whole library passes tests, docs are fine, all on 4.4.2.rc0.

Positive review.

comment:5 in reply to: ↑ 4 Changed 8 years ago by nthiery

Replying to rbeezer:

Looks good (including the addition of a new doctest for this situation).

Applies, builds, whole library passes tests, docs are fine, all on 4.4.2.rc0.

Positive review.

Thanks Rob, that was quick!

comment:6 Changed 7 years ago by mhansen

  • Merged in set to sage-4.4.4.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.