diff --git a/core/dvector.h b/core/dvector.h index fbb1fc4824a..a5519ed6041 100644 --- a/core/dvector.h +++ b/core/dvector.h @@ -285,6 +285,7 @@ public: Error resize(int p_size); + void invert(); void operator=(const DVector& p_dvector) { reference(p_dvector); } DVector() {} @@ -424,6 +425,18 @@ Error DVector::resize(int p_size) { return OK; } +template +void DVector::invert() { + T temp; + Write w = write(); + int s = size(); + int half_s = s/2; + for(int i=0;i