24#ifndef _GEMA_NUMSOLVER_PRINTER_H_
25#define _GEMA_NUMSOLVER_PRINTER_H_
42 GM_NS_PRINT_MATRIX = 0x01,
43 GM_NS_PRINT_VECTOR = 0x02,
44 GM_NS_PRINT_RESULT = 0x04,
45 GM_NS_SAVE_MATRIX = 0x10,
46 GM_NS_SAVE_VECTOR = 0x20,
47 GM_NS_SAVE_RESULT = 0x40,
55 void setPrintAndSaveOptions(
int options,
QString baseFileName,
int fieldWidth = 0,
56 char format =
'g',
int precision = -1,
int filterAttr = -1,
63 return _solver->newMatrix(nlin, ncol, sharedLayout, numThreads);
66 QString id()
const {
return _solver->id(); }
67 QString description()
const {
return _solver->description(); }
68 QString pluginTypeName()
const {
return _solver->pluginTypeName(); }
69 const char* pluginCategory()
const {
return _solver->pluginCategory(); }
70 const char* pluginName()
const {
return _solver->pluginName(); }
71 const char* pluginType()
const {
return _solver->pluginType(); }
72 bool setSolverTolerance(
double tol) {
return _solver->setSolverTolerance(tol); }
73 QString quickDescription()
const {
return _solver->quickDescription(); }
74 int trackItemId()
const {
return _solver->trackItemId(); }
75 void printParameters(
const GmLogCategory& logger) { _solver->printParameters(logger); }
80 bool saveMatrix (FILE* f,
const GmSolverMatrix* A,
bool extended)
const;
81 bool saveVector (FILE* f,
const GmVector& v,
bool header)
const;
82 bool checkPrintAndSaveFilter(
QString& filterStr)
const;
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for NumSolver type plugins.
Definition gmNumSolver.h:36
A proxy class that can wrap and behave like a GmNumSolver object, adding the possibility for printing...
Definition gmNumSolverPrinter.h:36
QString _psFilterSuffix
The file suffix with the name of the active filter attribute (with : characters converted to -)
Definition gmNumSolverPrinter.h:93
int _psOptions
Print and save options. An or of PrintAndSaveOptions flags
Definition gmNumSolverPrinter.h:85
int _nextAttrValIndex
The index in _psAttrValues of the next attr value for the save / print filter.
Definition gmNumSolverPrinter.h:94
QVector< double > _psAttrValues
The sorted list of attribute values for printing and saving when the filter is active.
Definition gmNumSolverPrinter.h:92
GmNumSolver * solver() const
Returns the wrapped numeric solver.
Definition gmNumSolverPrinter.h:53
int _printPrecision
Print format parameter: The number of decimal places.
Definition gmNumSolverPrinter.h:88
char _printFormat
Print format parameter: The format type f' or 'g'.
Definition gmNumSolverPrinter.h:87
int _saveIndex
The unique index used to guarantee file name unicity.
Definition gmNumSolverPrinter.h:90
int _psFilterAttr
The print and save filter attribute, -1 for no filtering.
Definition gmNumSolverPrinter.h:91
PrintAndSaveOptions
Options for printing and saving parts of the linear system Ax = b.
Definition gmNumSolverPrinter.h:41
QString _saveBaseFileName
The base file name for saving.
Definition gmNumSolverPrinter.h:89
int _printFieldWidth
Print format parameter: The matrix column minimum width.
Definition gmNumSolverPrinter.h:86
GmNumSolver * _solver
The wrapped solver object.
Definition gmNumSolverPrinter.h:84
Base interface class for Solver Matrix objects.
Definition gmSolverMatrix.h:100
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of the GmNumSolver interface class.
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34