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]

Re: gsl_vector_fprintf


Yup, a pretty print function is needed, probably with options to use
separators like , or to enclose the vector in parentheses.

The output from the current print functions is not very readable on
screen -- it's really intended for dumping to a file and to allow
arbitrary formats to be used, e.g. hex for integer data.

E. Robert Tisdale writes:
 > I am suggesting that the GSL vector fprintf function be changed from
 > 
 >     int gsl_vector_fprintf(FILE *stream, const gsl_vector* v,
 >       const char* format);
 > 
 > to
 > 
 >     int gsl_vector_fprintf(FILE *stream, const gsl_vector* v,
 >       int width, unsigned int precision, unsigned int columns);
 > 
 > This permits the numerical application programmer
 > to display columns elements of a row vector at a time
 > on a line with a space between each element on a line
 > like this:
 > 
 >     0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
 > 
 > instead of like this:
 > 
 >     0.0
 >     1.0
 >     2.0
 >     3.0
 >     4.0
 >     5.0
 >     6.0
 >     7.0
 >     8.0
 >     9.0
 > 
 > for a vector of 10 elements, for example.
 > A similar function for type gsl_matrix
 > simply prints the row vectors in order
 > so that it appears as a matrix on the display
 > if all of the columns of a row fit on one line.
 > 

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