Fix name clash in "m.block(i,j,m,n)" where m has two meanings.

Fix simple typos in tutorial.
This commit is contained in:
Jitse Niesen
2010-06-29 11:42:51 +01:00
parent cf3616b2c0
commit 3070164525
3 changed files with 40 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ linear-algebraic operations. For example, \c matrix1 \c * \c matrix2 means matri
and \c vector \c + \c scalar is just not allowed. If you want to perform all kinds of array operations,
not linear algebra, see \ref TutorialArrayClass "next page".
\section TutorialArithmeticAddSub Addition and substraction
\section TutorialArithmeticAddSub Addition and subtraction
The left hand side and right hand side must, of course, have the same numbers of rows and of columns. They must
also have the same \c Scalar type, as Eigen doesn't do automatic type promotion. The operators at hand here are:
@@ -67,7 +67,7 @@ VectorXf a(50), b(50), c(50), d(50);
...
a = 3*b + 4*c + 5*d;
\endcode
Eigen compiles it to just one for loop, so that the arrays are traversed only once. Simplyfying (e.g. ignoring
Eigen compiles it to just one for loop, so that the arrays are traversed only once. Simplifying (e.g. ignoring
SIMD optimizations), this loop looks like this:
\code
for(int i = 0; i < 50; ++i)
@@ -124,7 +124,7 @@ introducing a temporary here, so it will compile \c m=m*m as:
tmp = m*m;
m = tmp;
\endcode
If you know your matrix product can be safely evluated into the destination matrix without aliasing issue, then you can use the \c nolias() function to avoid the temporary, e.g.:
If you know your matrix product can be safely evaluated into the destination matrix without aliasing issue, then you can use the \c noalias() function to avoid the temporary, e.g.:
\code
c.noalias() += a * b;
\endcode