24 #ifndef _GEMA_SOLVER_MATRIX_H_ 25 #define _GEMA_SOLVER_MATRIX_H_ 118 virtual bool supportsBatchInsert()
const = 0;
121 virtual bool supportsSparseLayouts()
const = 0;
126 virtual bool supportsRandomSet()
const = 0;
129 virtual ParallelAddMode supportedParallelAddMode()
const = 0;
141 virtual bool beginBatchInsert(
size_t expectedEntries = 0) = 0;
148 virtual bool endBatchInsert(
bool discardData =
false) = 0;
159 virtual bool emptyLayout()
const = 0;
166 virtual bool symmetric()
const = 0;
181 virtual void setSymmetric(
bool sym) = 0;
184 virtual int nlin()
const = 0;
187 virtual int ncol()
const = 0;
196 virtual int layoutSize()
const = 0;
199 virtual double at(
int lin,
int col)
const = 0;
212 double operator()(
int lin,
int col)
const {
return at(lin, col); }
221 virtual bool inLayout(
int lin,
int col)
const = 0;
234 virtual void set(
int lin,
int col,
double value) = 0;
246 virtual void add(
int lin,
int col,
double value) = 0;
271 virtual void clear(
bool keepSparseLayout) = 0;
301 virtual void clearLineAndColumnSet(
const QList<int>& indexList,
bool setDiagonal,
bool keepSparseLayout) = 0;
306 virtual void ensureDiagonal() = 0;
314 virtual void matAdd(
const GmVector& a,
const GmVector& b,
double zeroTol = 0.0) = 0;
355 virtual void columnMulAdd(
int col,
GmVector& f,
double v,
const bool* skipRows = NULL)
const = 0;
366 virtual size_t usedMemory()
const = 0;
#define GM_DOUBLECMP_ABSTOL
Tolerância absoluta entre valores para comparar valores próximos de zero.
Definition: gmDoubleCmp.h:64
virtual ~GmSolverMatrix()
Virtual destructor.
Definition: gmSolverMatrix.h:115
Base interface class for Solver Matrix objects.
Definition: gmSolverMatrix.h:97
double operator()(int lin, int col) const
Returns the value in the position Mat[lin][col].
Definition: gmSolverMatrix.h:212
An interface for building the layout structure of a sparse matrix.
Definition: gmSparseMatrixLayoutBuilder.h:39
ParallelAddMode
Supported modes for calling add from multiple threads in parallel.
Definition: gmSolverMatrix.h:107
Functions for comparing double values.
void print(const GmMatrix &m, const GmLogCategory &logger, GmLogLevel level, int fieldWidth, char format, int precision)
Prints the matrix using the specified logger, level and precision fields.
Definition: gmMatrixUtils.cpp:34
Declaration of the GmVector class.
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
GmLogLevel
Available log levels list.
Definition: gmLog.h:36
Class representing a category with multiple logging levels.
Definition: gmLog.h:58
#define GM_DOUBLECMP_RELTOL
Tolerância relativa entre valores = 0.000001%.
Definition: gmDoubleCmp.h:61
A base structure for storing layout data for sparse marices (fill structure or non zero positions)....
Definition: gmSparseMatrixLayout.h:65
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
Declaration of support functions and macros for information logging.