RE: [Lapackpp-devel] Updating operator<< for matlab, maple, etc.
Status: Beta
Brought to you by:
cstim
|
From: Jacob \(Jack\) G. <jg...@cs...> - 2005-03-16 14:05:56
|
I guess I can put it in LaException, but that would be kind of wrong, since
exceptions generally have nothing to do with the display of matrices. Maybe
it would be better to create a globals.h file or put it in lafnames.h ?
Jack
-----Original Message-----
From: Christian Stimming [mailto:sti...@tu...]
Sent: Wednesday, March 16, 2005 3:28 AM
To: Jacob (Jack) Gryn
Cc: lap...@li...
Subject: Re: [Lapackpp-devel] Updating operator<< for matlab, maple, etc.
Hi,
Jacob (Jack) Gryn schrieb:
> I've been pretty busy with projects lately, so I haven't had a chance to
> properly implement this into lapackpp;
No problem. Take your time :-)) as we all do.
> but now that I have an
> opportunity, as I mentioned a few months back, I would like to change
> the operator<< output to give a display that can easily be copied/pasted
> into matlab or maple (or any other math software people may wish to use).
Ok.
> My question is this:
>
> I would like to make some sort of a global variable called something
> like DISP_FORMAT, that can be set to one of the following: {NORMAL,
> MATLAB, MAPLE, .}
> Where should I put this variable that it can be accessible to the matrix
> classes and most programs?
So far we don't have any global variables *except* for the
LaException::_print variable.
Each of the matrix classes also has a static flag whether debug mode is
turned on or not, but a matrix class would probably be the wrong place
for the disp_format flag because that one should affect all matrix
classes at once.
> Maybe it should be a member or class variable of the matrix classes
> instead, calling something like myGMD.setDisplay(MATLAB), or
> LaGenMatDouble::setDisplay(MATLAB). ?
Probably not quite the best idea, because if you're using several
different matrix classes you would have to call
LaGenMatDouble::setDisplay(bla);
LaGenMatComplex::setDisplay(bla);
LaSymmMatDouble::setDisplay(bla);
and so on. I would rather want to have only one single library-wide flag
for this and this means there is also only one single library-wide
function to set this. Hm... that one should either go into
LaGenMatDouble because that's the central matrix class, or we abuse the
LaException class for this because that's the only class in lapackpp
that is (potentially) in use by everything. I might actually prefer
LaException::setMatrixDisplay()... do you think that would work?
Christian
|