working on permutation

This commit is contained in:
2024-01-16 22:03:46 +01:00
parent 41e9c359d5
commit 1e83fcfaf9
4 changed files with 126 additions and 5 deletions

11
vec.h
View File

@@ -253,6 +253,17 @@ public:
return r;
}
NRVec concatscaled(const NRVec &rhs, const T alpha=1) const
{
if(nn==0) return rhs;
if(rhs.nn==0) return *this;
NRVec r(nn+rhs.nn);
for(int i=0; i<nn; ++i) r[i] = (*this)[i];
for(int i=0; i<rhs.nn; ++i) r[nn+i] = rhs[i]*alpha;
return r;
}
//!concatenate vector into *this
void concatme(const NRVec &rhs)
{