blob: a658986c9ca12374c7d936acfbe9f5013ce71084 [file] [log] [blame]
Benoit Jacobe078bb22010-06-26 14:00:00 -04001namespace Eigen {
2
3/** \page TutorialAdvancedInitialization Tutorial - Advanced initialization
4 \ingroup Tutorial
5
6\section TutorialMatrixArithmCommaInitializer Comma initializer
7
8Eigen offers a comma initializer syntax which allows to set all the coefficients
9of any dense objects (matrix, vector, array, block, etc.) to specific values:
10\include Tutorial_commainit_01.cpp
11Output: \verbinclude Tutorial_commainit_01.out
12
13Moreover, the elements of the initialization list may themselves be Eigen expressions:
14\include Tutorial_commainit_02.cpp
15Output: \verbinclude Tutorial_commainit_02.out
16
17<span class="note">\b Side \b note: here \link CommaInitializer::finished() .finished() \endlink
18is used to get the actual matrix object once the comma initialization
19of our temporary submatrix is done. Note that despite the apparent complexity of such an expression,
20Eigen's comma initializer usually compiles to very optimized code without any overhead.</span>
21
22
23TODO mention using the comma initializer to fill a block xpr like m.row(i) << 1,2,3;
24
25TODO add more sections about Identity(), Zero(), Constant(), Random(), LinSpaced().
26
27*/
28
29}