| 3073 | */ |
| 3074 | template <class DataType> |
| 3075 | void QCPDataContainer<DataType>::squeeze(bool preAllocation, bool postAllocation) |
| 3076 | { |
| 3077 | if (preAllocation) |
| 3078 | { |
| 3079 | if (mPreallocSize > 0) |
| 3080 | { |
| 3081 | std::copy(begin(), end(), mData.begin()); |
| 3082 | mData.resize(size()); |
| 3083 | mPreallocSize = 0; |
| 3084 | } |
| 3085 | mPreallocIteration = 0; |
| 3086 | } |
| 3087 | if (postAllocation) |
| 3088 | mData.squeeze(); |
| 3089 | } |
| 3090 | |
| 3091 | /*! |
| 3092 | Returns an iterator to the data point with a (sort-)key that is equal to, just below, or just |