Ticket #8913 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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 Work issues:
Report Upstream: N/A Reviewers: Rob Beezer
Authors: Nicolas M. Thiéry Merged in: sage-4.4.4.alpha0
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

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

Change History

comment:1 Changed 3 years ago by nthiery

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

Changed 3 years ago by nthiery

comment:2 Changed 3 years ago by nthiery

  • Cc rbeezer added

comment:3 Changed 3 years ago by rbeezer

  • Reviewers set to Rob Beezer

Looks good. Running tests now.

comment:4 follow-up: ↓ 5 Changed 3 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 3 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 3 years ago by mhansen

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