mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
mv comma initializer to page 1
This commit is contained in:
parent
de1220aa62
commit
aae5994b9e
@ -16,6 +16,7 @@ This page is the first one in a much longer multi-page tutorial.
|
|||||||
- \ref TutorialMatrixDynamic
|
- \ref TutorialMatrixDynamic
|
||||||
- \ref TutorialMatrixConstructors
|
- \ref TutorialMatrixConstructors
|
||||||
- \ref TutorialMatrixCoeffAccessors
|
- \ref TutorialMatrixCoeffAccessors
|
||||||
|
- \ref TutorialMatrixCommaInitializer
|
||||||
- \ref TutorialMatrixSizesResizing
|
- \ref TutorialMatrixSizesResizing
|
||||||
- \ref TutorialMatrixAssignment
|
- \ref TutorialMatrixAssignment
|
||||||
- \ref TutorialMatrixFixedVsDynamic
|
- \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
|
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] !
|
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
|
\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.
|
The current sizes can be retrieved by rows(), cols() and size(). Resizing a dynamic-size matrix is done by the resize() method.
|
||||||
|
@ -11,7 +11,6 @@ between matrices, vectors and scalars with Eigen.
|
|||||||
|
|
||||||
\b Table \b of \b contents
|
\b Table \b of \b contents
|
||||||
- \ref TutorialArithmeticIntroduction
|
- \ref TutorialArithmeticIntroduction
|
||||||
- \ref TutorialArithmeticMentionCommaInitializer
|
|
||||||
- \ref TutorialArithmeticAddSub
|
- \ref TutorialArithmeticAddSub
|
||||||
- \ref TutorialArithmeticScalarMulDiv
|
- \ref TutorialArithmeticScalarMulDiv
|
||||||
- \ref TutorialArithmeticMentionXprTemplates
|
- \ref TutorialArithmeticMentionXprTemplates
|
||||||
@ -30,14 +29,6 @@ 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,
|
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".
|
not linear algebra, see \ref TutorialArrayClass "next page".
|
||||||
|
|
||||||
\section TutorialArithmeticMentionCommaInitializer A note about comma-initialization
|
|
||||||
|
|
||||||
In examples below, we'll be initializing matrices with a very convenient device known as the \em comma-initializer.
|
|
||||||
For now, it is enough to know this example:
|
|
||||||
\include Tutorial_commainit_01.cpp
|
|
||||||
Output: \verbinclude Tutorial_commainit_01.out
|
|
||||||
The comma initializer is discussed in \ref TutorialAdvancedInitialization "this page".
|
|
||||||
|
|
||||||
\section TutorialArithmeticAddSub Addition and substraction
|
\section TutorialArithmeticAddSub Addition and substraction
|
||||||
|
|
||||||
The left hand side and right hand side must, of course, have the same numbers of rows and of columns. They must
|
The left hand side and right hand side must, of course, have the same numbers of rows and of columns. They must
|
||||||
|
Loading…
x
Reference in New Issue
Block a user