|
|
@ -49,7 +49,10 @@ namespace dlib
|
|
|
|
<< "\n\t i: " << i
|
|
|
|
<< "\n\t i: " << i
|
|
|
|
<< "\n\t size(): " << size()
|
|
|
|
<< "\n\t size(): " << size()
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return data[(i+offset)%data.size()];
|
|
|
|
auto index = i + offset;
|
|
|
|
|
|
|
|
if (index >= data.size())
|
|
|
|
|
|
|
|
index -= data.size();
|
|
|
|
|
|
|
|
return data[index];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const T& operator[] ( unsigned long i) const
|
|
|
|
const T& operator[] ( unsigned long i) const
|
|
|
@ -61,7 +64,10 @@ namespace dlib
|
|
|
|
<< "\n\t i: " << i
|
|
|
|
<< "\n\t i: " << i
|
|
|
|
<< "\n\t size(): " << size()
|
|
|
|
<< "\n\t size(): " << size()
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return data[(i+offset)%data.size()];
|
|
|
|
auto index = i + offset;
|
|
|
|
|
|
|
|
if (index >= data.size())
|
|
|
|
|
|
|
|
index -= data.size();
|
|
|
|
|
|
|
|
return data[index];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void resize(unsigned long size)
|
|
|
|
void resize(unsigned long size)
|
|
|
|