coord: add elementwise pow function

This commit is contained in:
Danny Robson 2015-10-12 23:56:41 +11:00
parent bb6256c5a2
commit 3e884113fd

View File

@ -261,6 +261,21 @@ namespace util {
return k;
}
//-------------------------------------------------------------------------
template <
size_t S,
typename T,
template <size_t,typename> class K
>
K<S,T>
pow (K<S,T> k)
{
for (auto &v: k)
v = pow (v);
return k;
}
///////////////////////////////////////////////////////////////////////////
// logical element operators