#17233: Uniform  random generation  of StandardTableau of a given size
-------------------------------------+-------------------------------------
       Reporter:  g.chatel           |        Owner:  gchatel
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.4
      Component:  PLEASE CHANGE      |   Resolution:
       Keywords:  StandardTableaux,  |    Merged in:
  random, combinat                   |    Reviewers:
        Authors:  Grégory Châtel     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  public/combinat    |  3afe72304d59aa71dd7c212ea7f3a20a49245821
  /tableaux-random-17233             |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by darij):

 Just a few comments:

 - The doc should start with a brief description of what the code does, not
 what theorems it uses. If your algorithm gives a uniform random
 permutation, then it should say so explicitly.

 - Do not use generic catch-all constructors such as `Permutation(...)`.
 These ducktype the input to guess which form you are giving the
 permutation in. This is great for interactive use, but in your code you
 know what form you are giving already -- it is the cycle form. So you can
 save some time and remove a source of possible bugs by replacing
 `Permutation(...)` by `sage.combinat.permutation.from_cycles(...)`.

 - Is this:
 {{{
 PerfectMatchings(set(range(1, self.size + 1)) -
 set(fixed_point_positions)).random_element()
 }}}
 actually efficient? I am asking because I don't see a random method in
 perfect_matchings.py, but I might not be looking in the right place.

--
Ticket URL: <http://trac.sagemath.org/ticket/17233#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to