coord: add elementwise pow function
This commit is contained in:
parent
bb6256c5a2
commit
3e884113fd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user