A matrix class with which dependencies among matrices can be handled. More...
#include "DepRelMatrix.hpp"
Public Member Functions | |
DepRelMatrixT (const DepRelMatrixT &Other) | |
virtual void | Update () |
This method updates this matrix from the matrices it depends on (the source matrices). More... | |
Public Attributes | |
MatrixT | Matrix |
The matrix. More... | |
unsigned long | Age |
The "age" or change-count of this matrix. How old the source matrix was when we were last updated. More... | |
const unsigned long | ID |
The unique ID of this matrix. Useful for unambiguous identification. More... | |
A matrix class with which dependencies among matrices can be handled.
In order to model a specific dependency relationship, child classes should be derived from this class, see InverseMatrixT and ProductMatrixT for examples. Note that also the roots/parents/sources of the dep. relationships should (or at least: can) be matrix objects of the DepRelMatrixT class, because that helps to avoid unecessary updates of the dependents.
|
inlinevirtual |
This method updates this matrix from the matrices it depends on (the source matrices).
Derived classes are expected to overwrite this method in order to provide the desired behaviour. Their code should make good use of the Age member in order to minimize update efforts. User code should call this method before accessing the Matrix (or Age) member whenever there is a chance that the source matrices changed since the last call to Update().
Reimplemented in ProductMatrixT, and InverseMatrixT.
unsigned long DepRelMatrixT::Age |
The "age" or change-count of this matrix. How old the source matrix was when we were last updated.
const unsigned long DepRelMatrixT::ID |
The unique ID of this matrix. Useful for unambiguous identification.
MatrixT DepRelMatrixT::Matrix |
The matrix.