aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/tutorial.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-09-27 07:42:12 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-09-27 07:42:12 +0000
commit628b1a8f6d2635bc7dadfd16f3af56b4a664e233 (patch)
tree1496ce52ab13d6f220aab6fca6ab55e0416658ab /doc/tutorial.cpp
parent8a024825d26aee76431e4c7dab98f114bf51dff2 (diff)
implement scalar operators separately for each type using a macro.
This is required e.g. to allow "2 * m" with m a matrix of doubles.
Diffstat (limited to 'doc/tutorial.cpp')
-rw-r--r--doc/tutorial.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/doc/tutorial.cpp b/doc/tutorial.cpp
index efadc9bfa..18a1ced55 100644
--- a/doc/tutorial.cpp
+++ b/doc/tutorial.cpp
@@ -5,16 +5,12 @@ using namespace Eigen;
int main(int, char **)
{
- Matrix<double,2,2> m, n; // 2x2 fixed-size matrix with uninitialized entries
+ Matrix<double,2,2> m; // 2x2 fixed-size matrix with uninitialized entries
m(0,0) = 1;
m(0,1) = 2;
m(1,0) = 3;
m(1,1) = 4;
- n = m;
- n = eval(n*n+n);
- cout << n << endl;
-
cout << "Here is a 2x2 matrix m:" << endl << m << endl;
cout << "Let us now build a 4x4 matrix m2 by assembling together four 2x2 blocks." << endl;
MatrixXd m2(4,4); // dynamic matrix with initial size 4x4 and uninitialized entries