diff --git a/matrix/Vector.hpp b/matrix/Vector.hpp index 104742fd1c..5a8718a7e2 100644 --- a/matrix/Vector.hpp +++ b/matrix/Vector.hpp @@ -7,6 +7,9 @@ */ #pragma once + +#include + #include "math.hpp" namespace matrix @@ -67,6 +70,14 @@ public: (*this) /= norm(); } + Vector pow(Type v) const { + const Vector &a(*this); + Vector r; + for (size_t i = 0; i v3(v2); TEST(v2 == v3); + float data1_sq[] = {1,4,9,16,25}; + Vector v4(data1_sq); + TEST(v1 == v4.pow(0.5)); return 0; }