![]() |
GemaCoreLib
The GeMA Core library
|
A structure for storing a matrix layout in either CSR or CSC format. The template type defines the type that will be used for storing indices (the Armadillo library, for example, works with a 64 bits index while the LIS library works with a 32 bits index). More...
#include <gmSparseMatrixLayout.h>
Public Member Functions | |
GmCSxSparseMatrixLayout (bool arma) | |
Constructor. More... | |
virtual | ~GmCSxSparseMatrixLayout () |
Destuctor. | |
virtual bool | empty () const |
Returns true if the layout is empty. | |
virtual void | clear () |
Clears the layout releasing memory and making the matrix a zero matrix. | |
virtual int | index (int row, int col) const |
Returns the index for the value in the given matrix row, col. Returns -1 if the value is not part of the sparse layout. | |
virtual int | dindex (int n) const |
Returns the index for the value in the diagonal of the given matrix row (column). Returns -1 if the value is not part of the sparse layout. This call is semantically equivalent to calling index(n, n) but can be optimized depending on the sparse layout in use. | |
virtual void | printStatistics (const GmLogCategory &logger) const |
Print layout statistics to the given logger. | |
template<> | |
GMC_API_EXPORT int | index (int row, int col) const |
An especialization of GmCSxSparseMatrixLayout::index() for CSC matrices. Since we can't partially specialize a member function without partially specializing the whole classe, two identical implementations are needed, one for each IndexType if ever there is need for an <int, CSC> or an <uword, CSR> configurations. | |
template<> | |
GMC_API_EXPORT int | index (int row, int col) const |
An especialization of GmCSxSparseMatrixLayout::index() for CSR matrices. | |
![]() | |
GmSparseMatrixLayout (GmSparseMatrixLayoutTypes type) | |
Constructor. | |
virtual | ~GmSparseMatrixLayout () |
Virtual destructor. | |
void | emitLayoutCompleted () |
Emits the layoutCompleted signal. | |
![]() | |
virtual const QMetaObject * | metaObject () 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) |
QThread * | thread () 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) |
T | 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 ®Exp, 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< QByteArray > | dynamicPropertyNames () const const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
bool | inherits (const char *className) const const |
void | deleteLater () |
Public Attributes | |
IndexType * | _ptr |
Vector storing the index of the first non zero element of each matrix row(CSR)/column(CSC). Size = _n + 1. | |
IndexType * | _index |
Vector storing the column(CSR)/row(CSC) index for each non zero value. Size = _nnz. | |
int | _n |
The number of rows(CSR)/columns(CSC) in the matrix. | |
int | _nnz |
The number of elements stored in the matrix (in some cases zero values can be stored, so this can be different from the real number of non zero entries in the matrix) | |
int | _arma |
Stores 1 if the layout should store 1 extra space per vector to be compatible with Armadillo requirements. 0 otherwise. | |
![]() | |
GmSparseMatrixLayoutTypes | _type |
The stored sparse matrix type. | |
bool | _shared |
Is this layout shared? Mutable to enable matrices sharing a layout to specify so. | |
Protected Member Functions | |
int | indexWorker (int start, int end, int ind) const |
![]() | |
QObject * | sender () 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) |
Additional Inherited Members | |
![]() | |
void | layoutCompleted () |
A signal emmited when the layout has been completed. This signal is emmited on behalf of the layout builder so that matrices sharing a layout don't have to also share the builder. | |
![]() | |
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) |
![]() | |
objectName | |
A structure for storing a matrix layout in either CSR or CSC format. The template type defines the type that will be used for storing indices (the Armadillo library, for example, works with a 64 bits index while the LIS library works with a 32 bits index).
|
inline |
Constructor.
When the arma flag is set to true, the layout includes extra positions for storing sentinell values needed by the Armadillo CSC format