Changes between Initial Version and Version 10 of Ticket #30214


Ignore:
Timestamp:
08/14/20 17:21:33 (14 months ago)
Author:
slelievre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30214

    • Property Status changed from new to positive_review
    • Property Authors changed from to David Coudert
    • Property Summary changed from Add graph method to permutations to Add to_digraph method to Permutation
    • Property Branch changed from to public/combinat/30214_to_digraph
    • Property Reviewers changed from to Sébastien Labbé
    • Property Commit changed from to 12cadec9a8d01e5b7b804ee90e5a2df16dfef7a5
  • Ticket #30214 – Description

    initial v10  
    1 The `show` method for a permutation
     1Before this ticket, the `show` method for a permutation
    22
    33- computes a graph corresponding to that permutation
     
    55- but does not return it
    66
    7 It would be nice to have a method that returns the graph.
     7This ticket adds a `to_digraph` method to return the graph
     8and changes the `show` method to use it.
    89
    9 Inspired by a question by Ask Sage user magviana.
     10This allows the following:
     11{{{
     12sage: p = Permutation([3, 1, 2])
     13sage: g = p.to_digraph()
     14sage: g.edges(labels=False)
     15[(1, 3), (2, 1), (3, 2)]
     16}}}
     17
     18Inspired by a question by Ask Sage user magviana:
    1019
    1120- [https://ask.sagemath.org/question/52649 Ask Sage question 52649: How to LaTeX the graph of a permutation?]