/* dtkMatrix.tpp --- * * Author: Julien Wintz * Created: Tue Jul 16 11:18:48 2013 (+0200) * Version: * Last-Updated: Tue Jul 16 18:14:00 2013 (+0200) * By: Julien Wintz * Update #: 27 */ /* Change Log: * */ template dtkMatrixPrivate::dtkMatrixPrivate(void) { this->buffer = NULL; } template dtkMatrixPrivate::dtkMatrixPrivate(qulonglong r, qulonglong c) { this->allocate(r, c); } template dtkMatrixPrivate::~dtkMatrixPrivate(void) { if (this->buffer) delete[] this->buffer; } template T dtkMatrixPrivate::at(qulonglong i, qulonglong j) { return this->buffer[i * this->r_count + j]; } template void dtkMatrixPrivate::setAt(qulonglong i, qulonglong j, T value) { this->buffer[i * this->r_count + j] = value; } template void dtkMatrixPrivate::allocate(qulonglong c, qulonglong r) { this->buffer = new T[r * c]; this->r_count = r; this->c_count = c; }