123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #include "dense.h"
- #include <QtGlobal>
- Dense::Dense(const QByteArray &data) : AbstractDense(*(int64_t *)(data.data() + 8), *(int64_t *)(data.data() + 16), data)
- {
- }
- double Dense::rawValue(int i) const
- {
- return *(double *)(m_data.data() + 40 + i * sizeof(double));
- }
- template<>
- template<>
- double AbstractDense<QByteArray>::value<double>(int row, int column) const
- {
- const char *dataPtr = m_data.data() + 40 + ((m_columns - 1) * row + column + row) * sizeof(double);
- return *(double *)dataPtr;
- }
|