inline HRectBound<MetricType, ElemType>::HRectBound( const HRectBound<MetricType, ElemType>& other) : dim(other.Dim()), bounds(new math::RangeType<ElemType>[dim]), minWidth(other.MinWidth()) { // Copy other bounds over. for (size_t i = 0; i < dim; i++) bounds[i] = other[i]; }
HRectBound<t_pow>::HRectBound(const HRectBound& other) : dim(other.Dim()), bounds(new math::Range[dim]) { // Copy other bounds over. for (size_t i = 0; i < dim; i++) bounds[i] = other[i]; }
inline HRectBound<MetricType, ElemType>& HRectBound<MetricType, ElemType>::operator=( const HRectBound<MetricType, ElemType>& other) { if (dim != other.Dim()) { // Reallocation is necessary. if (bounds) delete[] bounds; dim = other.Dim(); bounds = new math::RangeType<ElemType>[dim]; } // Now copy each of the bound values. for (size_t i = 0; i < dim; i++) bounds[i] = other[i]; minWidth = other.MinWidth(); return *this; }