aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/C01_TutorialMatrixClass.dox
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-28 00:22:47 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-28 00:22:47 +0200
commitaae5994b9e012175ad9d66b1165999e8fa89b360 (patch)
tree358a96c13884ce2cbd39ac31729a130ea0babbf7 /doc/C01_TutorialMatrixClass.dox
parentde1220aa62b8ec06dc608e86e023ce2b25658642 (diff)
mv comma initializer to page 1
Diffstat (limited to 'doc/C01_TutorialMatrixClass.dox')
-rw-r--r--doc/C01_TutorialMatrixClass.dox9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/C01_TutorialMatrixClass.dox b/doc/C01_TutorialMatrixClass.dox
index fe356c123..2d84cd72c 100644
--- a/doc/C01_TutorialMatrixClass.dox
+++ b/doc/C01_TutorialMatrixClass.dox
@@ -16,6 +16,7 @@ This page is the first one in a much longer multi-page tutorial.
- \ref TutorialMatrixDynamic
- \ref TutorialMatrixConstructors
- \ref TutorialMatrixCoeffAccessors
+ - \ref TutorialMatrixCommaInitializer
- \ref TutorialMatrixSizesResizing
- \ref TutorialMatrixAssignment
- \ref TutorialMatrixFixedVsDynamic
@@ -144,6 +145,14 @@ The operator[] is also overloaded for index-based access in vectors, but keep in
take more than one argument. We restrict operator[] to vectors, because an awkwardness in the C++ language
would make matrix[i,j] compile to the same thing as matrix[j] !
+\section TutorialMatrixCommaInitializer Comma-initialization
+
+Matrix and vector coefficients can be conveniently set using the so-called \em comma-initializer syntax.
+For now, it is enough to know this example:
+\include Tutorial_commainit_01.cpp
+Output: \verbinclude Tutorial_commainit_01.out
+The right hand side can also contains matrix expressions as discussed in \ref TutorialAdvancedInitialization "this page".
+
\section TutorialMatrixSizesResizing Resizing
The current sizes can be retrieved by rows(), cols() and size(). Resizing a dynamic-size matrix is done by the resize() method.