public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: fprintf for blocks/vectors: why the \n?
  2001-12-19 13:20 ` Gerard Jungman
@ 2001-12-05 12:20   ` Gerard Jungman
  0 siblings, 0 replies; 6+ messages in thread
From: Gerard Jungman @ 2001-12-05 12:20 UTC (permalink / raw)
  To: Fleur Kelpin; +Cc: gsl-discuss

Fleur Kelpin wrote:
>
> If the automatic \n in block/fprintf_source.c were to go, people could
> provide the format "%g\n" or "%g\t" or anything they like.
> 
> This makes it easier to send the output of a time series of vectors to
> e.g. gnuplot because one can also print to columns then, instead of
> the now compulsory elements below each other.

I never noticed this. I agree; the way it is now is not right.


> Or, if backwards compatibility is a concern, maybe provide this in a
> second function with slightly different name?

Brian, what do you think?


-- 
G. Jungman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* fprintf for blocks/vectors: why the \n?
  2001-12-19 13:20 fprintf for blocks/vectors: why the \n? Fleur Kelpin
@ 2001-12-05 12:20 ` Fleur Kelpin
  2001-12-19 13:20 ` Brian Gough
  2001-12-19 13:20 ` Gerard Jungman
  2 siblings, 0 replies; 6+ messages in thread
From: Fleur Kelpin @ 2001-12-05 12:20 UTC (permalink / raw)
  To: gsl-discuss

Hi all,

If the automatic \n in block/fprintf_source.c were to go, people could
provide the format "%g\n" or "%g\t" or anything they like.

This makes it easier to send the output of a time series of vectors to
e.g. gnuplot because one can also print to columns then, instead of
the now compulsory elements below each other.

Or, if backwards compatibility is a concern, maybe provide this in a
second function with slightly different name?

The way things are now, I find I am writing my own for loops for printing,
whereas gsl tries to provide this functionality.

Greetings,
Fleur Kelpin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fprintf for blocks/vectors: why the \n?
  2001-12-19 13:20 ` Brian Gough
@ 2001-12-05 13:33   ` Brian Gough
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Gough @ 2001-12-05 13:33 UTC (permalink / raw)
  To: Fleur Kelpin; +Cc: gsl-discuss

Fleur Kelpin writes:
 > If the automatic \n in block/fprintf_source.c were to go, people could
 > provide the format "%g\n" or "%g\t" or anything they like.

Hi,

That function is just intended as an ascii version of the binary write
function, for portability purposes.  Hence it dumps the list of
numbers to the stream without any structure.

 > The way things are now, I find I am writing my own for loops for printing,
 > whereas gsl tries to provide this functionality.

Yes, to actually display a vector or matrix you'll need to write your
own (little) display routine which prints them in your favorite
format.  Then you can call one of those routines whenever you need to
display a vector or matrix.

If somebody writes some good routines they can go into the library.
Ideally they should be able to display in all the standard formats
like Fortran, Octave, HTML, TeX, troff, etc using an argument to
select between them. 

regards

Brian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* fprintf for blocks/vectors: why the \n?
@ 2001-12-19 13:20 Fleur Kelpin
  2001-12-05 12:20 ` Fleur Kelpin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fleur Kelpin @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Hi all,

If the automatic \n in block/fprintf_source.c were to go, people could
provide the format "%g\n" or "%g\t" or anything they like.

This makes it easier to send the output of a time series of vectors to
e.g. gnuplot because one can also print to columns then, instead of
the now compulsory elements below each other.

Or, if backwards compatibility is a concern, maybe provide this in a
second function with slightly different name?

The way things are now, I find I am writing my own for loops for printing,
whereas gsl tries to provide this functionality.

Greetings,
Fleur Kelpin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fprintf for blocks/vectors: why the \n?
  2001-12-19 13:20 fprintf for blocks/vectors: why the \n? Fleur Kelpin
  2001-12-05 12:20 ` Fleur Kelpin
@ 2001-12-19 13:20 ` Brian Gough
  2001-12-05 13:33   ` Brian Gough
  2001-12-19 13:20 ` Gerard Jungman
  2 siblings, 1 reply; 6+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Fleur Kelpin; +Cc: gsl-discuss

Fleur Kelpin writes:
 > If the automatic \n in block/fprintf_source.c were to go, people could
 > provide the format "%g\n" or "%g\t" or anything they like.

Hi,

That function is just intended as an ascii version of the binary write
function, for portability purposes.  Hence it dumps the list of
numbers to the stream without any structure.

 > The way things are now, I find I am writing my own for loops for printing,
 > whereas gsl tries to provide this functionality.

Yes, to actually display a vector or matrix you'll need to write your
own (little) display routine which prints them in your favorite
format.  Then you can call one of those routines whenever you need to
display a vector or matrix.

If somebody writes some good routines they can go into the library.
Ideally they should be able to display in all the standard formats
like Fortran, Octave, HTML, TeX, troff, etc using an argument to
select between them. 

regards

Brian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fprintf for blocks/vectors: why the \n?
  2001-12-19 13:20 fprintf for blocks/vectors: why the \n? Fleur Kelpin
  2001-12-05 12:20 ` Fleur Kelpin
  2001-12-19 13:20 ` Brian Gough
@ 2001-12-19 13:20 ` Gerard Jungman
  2001-12-05 12:20   ` Gerard Jungman
  2 siblings, 1 reply; 6+ messages in thread
From: Gerard Jungman @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Fleur Kelpin; +Cc: gsl-discuss

Fleur Kelpin wrote:
>
> If the automatic \n in block/fprintf_source.c were to go, people could
> provide the format "%g\n" or "%g\t" or anything they like.
> 
> This makes it easier to send the output of a time series of vectors to
> e.g. gnuplot because one can also print to columns then, instead of
> the now compulsory elements below each other.

I never noticed this. I agree; the way it is now is not right.


> Or, if backwards compatibility is a concern, maybe provide this in a
> second function with slightly different name?

Brian, what do you think?


-- 
G. Jungman

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-12-19 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 fprintf for blocks/vectors: why the \n? Fleur Kelpin
2001-12-05 12:20 ` Fleur Kelpin
2001-12-19 13:20 ` Brian Gough
2001-12-05 13:33   ` Brian Gough
2001-12-19 13:20 ` Gerard Jungman
2001-12-05 12:20   ` Gerard Jungman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).