I am using the Eigen library. I want to transform each element in a vector to some constant to the power of the corresponding element from the vector. Example:
int c = 3;
Vector<int, 3> v = { 1, 2, 3 }
v = pow(v, 5); // < pseudocode
std::cout << v;
Desired output:
3 9 27
Explanation: {c^1, c^2, c^3} = {3^1, 3^2, 3^3} = {3, 9, 27}