commit | 42a050dc6881d00ed32ffe2b9d55192db8dca760 | [log] [tgz] |
---|---|---|
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | Mon Dec 27 15:06:55 2010 +0000 |
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | Mon Dec 27 15:06:55 2010 +0000 |
tree | c2ffabd791fc1060ff62732d8b5a46fb67734154 | |
parent | dc3618a55727a0471940c42baacbe58629b348ca [diff] [blame] |
Finish doc page on aliasing.
diff --git a/doc/snippets/TopicAliasing_mult2.cpp b/doc/snippets/TopicAliasing_mult2.cpp new file mode 100644 index 0000000..a3ff568 --- /dev/null +++ b/doc/snippets/TopicAliasing_mult2.cpp
@@ -0,0 +1,10 @@ +MatrixXf matA(2,2), matB(2,2); +matA << 2, 0, 0, 2; + +// Simple but not quite as efficient +matB = matA * matA; +cout << matB << endl << endl; + +// More complicated but also more efficient +matB.noalias() = matA * matA; +cout << matB;