From: Jacob \(Jack\) G. <jg...@cs...> - 2005-03-16 23:00:31
|
Ok. So I've committed the addition of an LaPreferences class, along with modified LaGenMatDouble, LaGenMatFloat, and LaGenMatComplex classes to support the new output formats (only operator<< has changed, along with the additional include of LA_PREFS_H). The following is how one would modify the output display format to be compatible with their favourite math program: Place #include LA_PREFS_H In the include statements, somewhere after "lafnames.h" At the beginning of your code, call LaPreferences::setPrintFormat(pFormat p, bool newlines); Where pFormat is an enum type, that can be one of the following {NORMAL, MATLAB, MAPLE}, and bool newlines toggles multiline matrix output (true = places a newline after each matrix row, false uses only the appropriate MATLAB/MAPLE delimiter) - this option is ignored if pFormat == NORMAL Enjoy! :-) BTW, I only did those 3 classes for now, it would take a while for me to implement and test all the classes, many of which I've never used before; but if anyone wants, feel free to make appropriate changes based on what's been done to gmc.cc, gmd.cc, gmf.cc. I really think it would be simpler to do if the matrix classes were derived from a single base class, so only one version of the operator<< would be needed (except for the ones with complex #'s). Jack |