Closed juanjqo closed 6 years ago
Hey Juan, Norms aren't implemented but you can calculate one reasonably efficiently by doing an inner product like so:
BLA::Matrix<4,1> x = {1,2,3,4};
BLA::Matrix<1,1> inner = ~x * x;
n = sqrt(inner(0));
I'll admit that's a little convoluted but it should do the trick for now
Thanks tom!
Hi Tom,
I want to compute the 2-norm operator of a vector. float n; BLA::Matrix<4,1> x = {1,2,3,4}; n = x.norm(); // n = 5.4772
Is it currently implemented?
Thank you for your time!
Att, Juan