From: Christian S. <sti...@tu...> - 2005-03-16 08:28:30
|
Hi, Jacob (Jack) Gryn schrieb: > I=92ve been pretty busy with projects lately, so I haven=92t had a chan= ce to=20 > properly implement this into lapackpp;=20 No problem. Take your time :-)) as we all do. > but now that I have an=20 > opportunity, as I mentioned a few months back, I would like to change=20 > the operator<< output to give a display that can easily be copied/paste= d=20 > into matlab or maple (or any other math software people may wish to use= ). Ok. > My question is this: >=20 > I would like to make some sort of a global variable called something=20 > like DISP_FORMAT, that can be set to one of the following: {NORMAL,=20 > MATLAB, MAPLE, =85} > Where should I put this variable that it can be accessible to the matr= ix > classes and most programs? So far we don't have any global variables *except* for the=20 LaException::_print variable. Each of the matrix classes also has a static flag whether debug mode is=20 turned on or not, but a matrix class would probably be the wrong place=20 for the disp_format flag because that one should affect all matrix=20 classes at once. > Maybe it should be a member or class variable of the matrix classes=20 > instead, calling something like myGMD.setDisplay(MATLAB), or=20 > LaGenMatDouble::setDisplay(MATLAB). ? Probably not quite the best idea, because if you're using several=20 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=20 for this and this means there is also only one single library-wide=20 function to set this. Hm... that one should either go into=20 LaGenMatDouble because that's the central matrix class, or we abuse the=20 LaException class for this because that's the only class in lapackpp=20 that is (potentially) in use by everything. I might actually prefer=20 LaException::setMatrixDisplay()... do you think that would work? Christian |