[GAP Forum] Printing

Thomas Breuer thomas.breuer at math.rwth-aachen.de
Fri Mar 23 08:46:27 GMT 2007


Dear GAP Forum,

Paul Hjelmstad wrote

> This is really poor of me, but I need to know how to send the Character 
> Table of the Monster group to a file so I can work with the data. (And 
> reformat it). Any suggestions would be appreciated. (Excel, Access or 
> whatever

The following code produces a CSV file called `m.csv'
with the ordinary irreducible characters of the Monster.
You should be able to read this format with Excel, for example.

    colsep:= ",";;
    rowsep:= "\n";;
    dstfile:= "m.csv";;
    
    t:= CharacterTable( "M" );
    irr:= Irr( t );;
    irrstrings:= List( irr,
                       l -> List( l, x -> Quadratic( x ).ATLAS ) );;
    csvstrings:= List( irrstrings,
                       x -> JoinStringsWithSeparator( x, colsep ) );;
    FileString( dstfile,
                JoinStringsWithSeparator( csvstrings, rowsep ) );

A few comments:
- Of course you can use different separators for the columns and rows.
- The irrational values in the table lie in quadratic field extensions
  of the rational number field;
  this is why the conversion with `Quadratic' works.
  If you need a different format for irrational values then change the
  conversion accordingly.
- If you need more data from the character table than just the
  irreducible characters (element orders, power maps) then
  extend the file accordingly.
- I am not aware of a better tool than GAP for ``working with the data''.

All the best,
Thomas Breuer




More information about the Forum mailing list