GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmSparseMatrixBase Class Referenceabstract

A base class derived from QObject. Needed since GmSparseMatrix is a template and so can't inherit directly from QObject. More...

#include <gmSparseMatrix.h>

Inheritance diagram for GmSparseMatrixBase:
Collaboration diagram for GmSparseMatrixBase:

Protected Slots

virtual void matrixLayoutReady ()=0
 

Additional Inherited Members

- Public Types inherited from QObject
typedef  QObjectList
 
- Public Types inherited from GmSolverMatrix
enum  ParallelAddMode { NO_SUPPORT , THREAD_SAFE_SUPPORT , REENTRANT_SUPPORT }
 Supported modes for calling add from multiple threads in parallel. More...
 
- Public Member Functions inherited from QObject
virtual const QMetaObjectmetaObject () const const
 
 QObject (QObject *parent)
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
bool blockSignals (bool block)
 
QThreadthread () const const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
const QObjectListchildren () const const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
void dumpObjectTree () const const
 
void dumpObjectInfo () const const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const const
 
QList< QByteArraydynamicPropertyNames () const const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
bool inherits (const char *className) const const
 
void deleteLater ()
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
 Q_CLASSINFO (Name, Value)
 
 Q_INTERFACES (...)
 
 Q_PROPERTY (...)
 
 Q_ENUMS (...)
 
 Q_FLAGS (...)
 
 Q_ENUM (...)
 
 Q_FLAG (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG_NS (...)
 
 Q_OBJECT Q_OBJECT
 
 Q_GADGET Q_GADGET
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SLOTS Q_SLOTS
 
 Q_SLOT Q_SLOT
 
 Q_EMIT Q_EMIT
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
- Public Member Functions inherited from GmSolverMatrix
virtual ~GmSolverMatrix ()
 Virtual destructor.
 
virtual bool supportsBatchInsert () const =0
 Does this matrix supports batch inserts? See comments on the class documentation.
 
virtual bool supportsSparseLayouts () const =0
 Does this matrix supports sparse layouts? See comments on the class documentation.
 
virtual bool supportsRandomSet () const =0
 Does this matrix supports setting a value on a random position outside the matrix initialization process (either by a batch insert or a layout builder)?
 
virtual ParallelAddMode supportedParallelAddMode () const =0
 Returns the supported mode for calling add.
 
virtual bool beginBatchInsert (size_t expectedEntries=0)=0
 Begins a batch insert process. Important: see comments on the class documentation.
 
virtual bool endBatchInsert (bool discardData=false)=0
 Ends a batch insert process. Important: see comments on the class documentation.
 
virtual GmSparseMatrixLayoutBuilderlayoutBuilder () const =0
 If the matrix supports sparse layouts, returns a builder object that can be used to initialize the matrix layout. Otherwise returns NULL. If the layout is being shared by several matrices, only the main matrix, owning the layout should return it.
 
virtual bool emptyLayout () const =0
 If the matrix supports sparse layouts and the layout is currently empty, returns true. Otherwise, returns false.
 
virtual bool symmetric () const =0
 Returns true if the matrix was marked as symmetric by setSymmetric() (it does not check for matrix symmetry itself)
 
virtual void setSymmetric (bool sym)=0
 Marks the matrix as symmetric or not.

 
virtual bool isSymmetric (double relTol=GM_DOUBLECMP_RELTOL, double absTol=GM_DOUBLECMP_ABSTOL) const
 Returns true if the matrix is symmetric, false otherwise.
 
virtual int nlin () const =0
 Returns the number of lines in the matrix. IMPORTANT: This function implementation MUST be thread safe.
 
virtual int ncol () const =0
 Returns the number of columns in the matrix. IMPORTANT: This function implementation MUST be thread safe.
 
virtual int layoutSize () const =0
 Returns the size of the sparse matrix layout.
 
virtual double at (int lin, int col) const =0
 Returns the value in the position Mat[lin][col].
 
double operator() (int lin, int col) const
 Returns the value in the position Mat[lin][col].
 
virtual bool inLayout (int lin, int col) const =0
 Returns true if the given position belongs to the matrix sparse layout.
 
virtual void set (int lin, int col, double value)=0
 Sets the value in the position Mat[lin][col] to the specified value.
 
virtual void add (int lin, int col, double value)=0
 Adds the given value to the value in the position Mat[lin][col].
 
virtual void set (GmSolverMatrix *A, GmSolverMatrix *B, double c, bool sameStructure)=0
 Sets the values of the whole matrix to the result of the expression A + c * B, where A and B are matrices with the same size as this one and c is a constant.
 
virtual void clear (bool keepSparseLayout)=0
 Clears the matrix, filling it with zeros. The keepSparseLayout flag is a hint that the matrix layout (non zero positions) will remain the same when the matrix is re-filled with data, and so, if the matrix supports sparse layouts, they should not be removed. This function marks the matrix as unsymmetric.
 
virtual void clearLineAndColumnSet (const QVector< int > &indexList, bool setDiagonal, bool keepSparseLayout)=0
 Clears a set of lines and columns from the matrix, filling them with zeroes, optionally putting a 1.0 at the diagonal.
 
virtual void ensureDiagonal ()=0
 Updates any zero diagonal value to 1.0. If diagonal values do not belong to the layout, the matrix must NOT be shared!
 
virtual void matAdd (const GmVector &a, const GmVector &b, double zeroTol=0.0)=0
 Adds to the current matrix ('X') the (dense) matrix resulting from multiplying the column vector 'a' by the transpose of the column vector 'b' (X = X + a * b.t()).
 
virtual void mul (const GmVector &a, GmVector &b) const =0
 Multiplies the matrix ('X') by a vector 'a' storing the result in 'b' (b = X * a).

 
virtual void mulAdd (const GmVector &a, GmVector &b) const =0
 Multiplies the matrix ('X') by a vector 'a' adding the result to 'b' (b = b + X * a).
 
virtual void mulSub (const GmVector &a, GmVector &b) const =0
 Multiplies the matrix ('X') by a vector 'a' subtracting the result from 'b' (b = b - X * a).
 
virtual void columnMulAdd (int col, GmVector &f, double v, const bool *skipRows=NULL) const =0
 Updates the given vector adding to it a matrix column multiplied by a scalar value.
 
virtual size_t usedMemory () const =0
 Returns an estimative of the memory used by the matrix in bytes.
 
virtual bool hasNanInf () const =0
 Returns true if the matrix contains nan or inf values.
 
void print (const GmLogCategory &logger, GmLogLevel level, int fieldWidth=0, char format='g', int precision=-1) const
 Prints the matrix using the specified logger, level and precision fields.
 
virtual bool saveMatrixCoordinatesToFile (FILE *f) const =0
 Helper function to GmNumSolver saving capabilities, responsible for saving the matrix contents to the text file f.
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Protected Member Functions inherited from QObject
QObjectsender () const const
 
int senderSignalIndex () const const
 
int receivers (const char *signal) const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A base class derived from QObject. Needed since GmSparseMatrix is a template and so can't inherit directly from QObject.

Member Function Documentation

◆ matrixLayoutReady

virtual void GmSparseMatrixBase::matrixLayoutReady ( )
protectedpure virtualslot

The documentation for this class was generated from the following file: