#17798: Create a class for Coxeter matrices and types
-------------------------------------+-------------------------------------
       Reporter:  tscrim             |        Owner:  sage-combinat
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.6
      Component:  group theory       |   Resolution:
       Keywords:  Coxeter, groups,   |    Merged in:
  matrices, types, days64            |    Reviewers:
        Authors:  Travis Scrimshaw,  |  Work issues:
  Jean-Philippe Labbé                |       Commit:
Report Upstream:  N/A                |  f44e52fb40292424c439d90e29ddf0d3c0256b9f
         Branch:                     |     Stopgaps:
  public/combinat/coxeter_matrices-17798|
   Dependencies:  #17990             |
-------------------------------------+-------------------------------------

Comment (by tscrim):

 I doubt it's worth it to cache it...

 Anyways, the string representation would probably be something like this
 (untested):
 {{{
 def _repr_(self):
     w = max(len(str(v)) for row in self for v in row)
     fstr = '{:>' + str(w) + '}' # should result in something like '{:>30}'
     return '\n'.join('[' + ' '.join(fstr.format(v) for v in row) + ']' for
 row in self)
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17798#comment:19>
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