LaPreferences Class Reference

Global preferences class in Lapack++. More...

#include <laprefs.h>

List of all members.

Public Types

enum  pFormat { NORMAL, MATLAB, MAPLE }

Static Public Member Functions

static void setPrintFormat (pFormat p, bool newlines=true)
static pFormat getPrintFormat ()
static bool getPrintNewLines ()


Detailed Description

Global preferences class in Lapack++.

Class to store global (i.e. static i.e. library-wide) preferences.

Currently this only concerns the output display format of matrices. In the future, more preferences may or may not be added. In addition to this class, there is one more library-wide setting in LaException::enablePrint() but that concerns only the behaviour of exceptions and is therefore stored in that class.


Member Enumeration Documentation

enum LaPreferences::pFormat

Flags for choosing the output display format when printing the matrix elements to an ostream

Enumerator:
NORMAL  C++ display format (default)
MATLAB  Matlab format (DocumentMe: what exactly does this mean?)
MAPLE  Maple format (DocumentMe: what exactly does this mean?)


Member Function Documentation

static void LaPreferences::setPrintFormat ( pFormat  p,
bool  newlines = true 
) [static]

Set the output display format. The default is LaPreferences::NORMAL.

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 e.g.

  LaPreferences::setPrintFormat(LaPreferences::MATLAB, true);

where the first argument is your preferred output format, and the second argument toggles multiline matrix output (true = place a newline after each matrix row, false = use only the appropriate MATLAB/MAPLE delimiter). The second argument is ignored if the output format is LaPreferences::NORMAL.

Parameters:
p The preferred output format
newlines Toggles multiline matrix output (true = place a newline after each matrix row, false = use only the appropriate MATLAB/MAPLE delimiter). This argument is ignored if the output format is LaPreferences::NORMAL.

static pFormat LaPreferences::getPrintFormat (  )  [static]

Get the current output display format as set by setPrintFormat().

static bool LaPreferences::getPrintNewLines (  )  [static]

Get the current output display newline format as set by setPrintFormat().


Generated on Sat Jul 14 11:40:37 2007 for Lapack++ by  doxygen 1.5.0