This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: gsl_vector_fprintf
- To: "E. Robert Tisdale" <edwin at netwood dot net>
- Subject: Re: gsl_vector_fprintf
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Wed, 19 Jul 2000 21:41:49 +0100 (BST)
- Cc: gsl-discuss at sourceware dot cygnus dot com
- References: <397500CE.F0802503@netwood.net>
- Reply-To: gsl-discuss at sources dot redhat dot com
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.
>