@@ -146,7 +146,8 public: | |||
|
146 | 146 | } |
|
147 | 147 | } |
|
148 | 148 | |
|
149 | template <int D = Dim, typename = std::enable_if_t<D == 1> > | |
|
149 | /// @return the size (i.e. number of values) of a single component | |
|
150 | /// @remarks in a case of a two-dimensional ArrayData, each component has the same size | |
|
150 | 151 | int size() const |
|
151 | 152 | { |
|
152 | 153 | QReadLocker locker{&m_Lock}; |
@@ -170,13 +171,15 public: | |||
|
170 | 171 | return std::make_shared<ArrayData<Dim> >(std::move(sortedData)); |
|
171 | 172 | } |
|
172 | 173 | |
|
173 | template <int D = Dim, typename = std::enable_if_t<D == 1> > | |
|
174 | 174 | void clear() |
|
175 | 175 | { |
|
176 | 176 | QWriteLocker locker{&m_Lock}; |
|
177 | m_Data[0].clear(); | |
|
178 | } | |
|
179 | 177 | |
|
178 | auto nbComponents = m_Data.size(); | |
|
179 | for (auto i = 0; i < nbComponents; ++i) { | |
|
180 | m_Data[i].clear(); | |
|
181 | } | |
|
182 | } | |
|
180 | 183 | |
|
181 | 184 | private: |
|
182 | 185 | QVector<QVector<double> > m_Data; |
General Comments 0
You need to be logged in to leave comments.
Login now