This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Help-gsl] human-readable gsl_matrix_fprintf?


Tom Weber writes:
 > I just found out about gsl, this is the math library I always
 > needed but didn't know about!  I started playing with it, and found
 > that gsl_matrix_fprintf() prints one element per line, not very
 > readable if you ask me. Also I need to feed matrices to gnuplot.
 > The problem with human-readable matrices is the aligning of
 > columns, you must first check the max width of each column.  Why
 > isn't there a routine like this in gsl?

I considered adding a routine for pretty-printing but I realised there
are many possible formats that people would want (GNUPlot, Fortran,
R/S, Octave/Matlab, Maxima, LaTex, HTML, GP-PARI, XML, etc) and that I
I couldn't write one that was sufficiently general to handle all the
possibilities.  In particular there are also several common ways of
displaying complex numbers X Y, (X,Y), X+Y*I, X+Y*J.

I wanted to avoid the trap of adding "just one more" format each time,
or creating a function with so many arguments that it was difficult to
use, so I left it alone.

If I'm feeling strong I will think about it again.

-- 
Brian Gough


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]