aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/PartialRedux_squaredNorm.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-07 21:40:53 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-07 21:40:53 +0000
commit069ecbb4ab6104c0e04d5dafffa8cf750bdd82b0 (patch)
tree19e35988f995c86bf6f5eb8c58d9f35d3543b6c5 /doc/snippets/PartialRedux_squaredNorm.cpp
parent09fd69d7344c8abea3179a4f4e68fb7f23f10d1f (diff)
* complete the change norm2->squaredNorm in PartialRedux
* somehow the NICE_RANDOM stuff wasn't being used anymore and tests were sometimes failing again. Fixed by #including Eigen/Array instead of cherry-picking just Random.h. * little fixes in the unaligned assert page
Diffstat (limited to 'doc/snippets/PartialRedux_squaredNorm.cpp')
-rw-r--r--doc/snippets/PartialRedux_squaredNorm.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/snippets/PartialRedux_squaredNorm.cpp b/doc/snippets/PartialRedux_squaredNorm.cpp
new file mode 100644
index 000000000..9f3293e65
--- /dev/null
+++ b/doc/snippets/PartialRedux_squaredNorm.cpp
@@ -0,0 +1,3 @@
+Matrix3d m = Matrix3d::Random();
+cout << "Here is the matrix m:" << endl << m << endl;
+cout << "Here is the square norm of each row:" << endl << m.rowwise().squaredNorm() << endl;