NRVec::reverse()

This commit is contained in:
2026-03-09 16:52:42 +01:00
parent fea32c3611
commit 9b5372fcae
2 changed files with 4 additions and 0 deletions

3
vec.h
View File

@@ -195,6 +195,9 @@ public:
//! perform deep-copy of given vector
NRVec& operator|=(const NRVec &rhs);
//! return vector with reversed order of elements
NRVec reverse() const {NRVec r(nn); for(int i=0; i<nn; ++i) r[i]= v[nn-1-i]; return r;}
//! extract specified subvector
const NRVec subvector(const int from, const int to) const;
const NRVec subvector(const NRVec<int> &selection) const;