GemaCoreLib
The GeMA Core library
Protected Slots | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for GmSparseMatrixBase:
Collaboration graph
[legend]

Protected Slots

virtual void matrixLayoutReady ()=0
 

Additional Inherited Members

- 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
 
virtual void * qt_metacast (const char *)
 
virtual int qt_metacall (QMetaObject::Call, int, void **)
 
 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 QObjectList & children () 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 ()
 
- 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. More...
 
virtual bool endBatchInsert (bool discardData=false)=0
 Ends a batch insert process. Important: see comments on the class documentation. More...
 
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) More...
 
virtual void setSymmetric (bool sym)=0
 Marks the matrix as symmetric or not. More...
 
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. More...
 
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]. More...
 
virtual bool inLayout (int lin, int col) const =0
 Returns true if the given position belongs to the matrix sparse layout. More...
 
virtual void set (int lin, int col, double value)=0
 Sets the value in the position Mat[lin][col] to the specified value. More...
 
virtual void add (int lin, int col, double value)=0
 Adds the given value to the value in the position Mat[lin][col]. More...
 
virtual void set (GmSolverMatrix *A, GmSolverMatrix *B, double c, bool sameStructure)=0
 Sets the values of the whole matrix to the result of the expresion A + c * B, where A and B are matrices with the same size as this one and c is a constant. More...
 
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 QList< int > &indexList, bool setDiagonal, bool keepSparseLayout)=0
 Clears a set of lines and columns from the matrix, filling them with zeroes, optionally puting a 1.0 at the diagonal. More...
 
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()). More...
 
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). More...
 
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). More...
 
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). More...
 
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. More...
 
virtual size_t usedMemory () const =0
 Returns an estimative of the memory used by the matrix in bytes. More...
 
bool isSymmetric (double relTol=GM_DOUBLECMP_RELTOL, double absTol=GM_DOUBLECMP_ABSTOL) const
 Returns true if the matrix is symmetric, false otherwise. More...
 
void print (const GmLogCategory &logger, GmLogLevel level, int fieldWidth=0, char format='g', int precision=-1)
 Prints the matrix using the specified logger, level and precision fields.
 
- 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.


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