2023-12-06 05:22:55 +08:00
|
|
|
Vector3d v(-1, 2, -3);
|
2010-01-07 00:18:38 +08:00
|
|
|
cout << "the absolute values:" << endl << v.array().abs() << endl;
|
2023-12-06 05:22:55 +08:00
|
|
|
cout << "the absolute values plus one:" << endl << v.array().abs() + 1 << endl;
|
2010-01-07 00:18:38 +08:00
|
|
|
cout << "sum of the squares: " << v.array().square().sum() << endl;
|