The answer to your question can be found in the manual. In summary:
norm()
is the Frobenius norm, the square root of the sum of squares of the components.
.normalized()
returns a copy to the original object divided by this norm (i.e. the original object is not changed).
.normalize()
divides an object in-place by this norm (i.e. the original object itself is modified).
With this example you can convince yourself:
#include <Eigen/Eigen>
#include <iostream>
int main()
{
Eigen::VectorXd A(3);
A(0) = 1.;
A(1) = 2.;
A(2) = 3.;
std::cout << "A.norm() = " << std::endl;
std::cout << A.norm() << std::endl;
Eigen::VectorXd B = A.normalized();
std::cout << "B = " << std::endl;
std::cout << B << std::endl;
std::cout << "A = " << std::endl;
std::cout << A << std::endl;
A.normalize();
std::cout << "A = " << std::endl;
std::cout << A << std::endl;
}
I compiled with:
clang++ `pkg-config --cflags eigen3` so.cpp
but that varies from system to system.
The output:
A.norm() =
3.74166
B =
0.267261
0.534522
0.801784
A =
1
2
3
A =
0.267261
0.534522
0.801784