-Size set at run time:
+
+Size set at run time: | Size set at compile time: |
+
\include QuickStart_example2_dynamic.cpp
|
-Size set at compile time:
\include QuickStart_example2_fixed.cpp
|
diff --git a/doc/C01_TutorialMatrixClass.dox b/doc/C01_TutorialMatrixClass.dox
index de33175a3..15a745a84 100644
--- a/doc/C01_TutorialMatrixClass.dox
+++ b/doc/C01_TutorialMatrixClass.dox
@@ -196,7 +196,7 @@ but the following code is legal:
Assignment is the action of copying a matrix into another, using \c operator=. Eigen resizes the matrix on the left-hand side automatically so that it matches the size of the matrix on the right-hand size. For example:
-
+
Example: | Output: |
\include tut_matrix_assignment_resizing.cpp |
diff --git a/doc/I02_HiPerformance.dox b/doc/I02_HiPerformance.dox
index 7f0ce1569..49452a0bc 100644
--- a/doc/I02_HiPerformance.dox
+++ b/doc/I02_HiPerformance.dox
@@ -42,12 +42,12 @@ which exactly matches our GEMM routine.
\subsection GEMM_Limitations Limitations
Unfortunately, this simplification mechanism is not perfect yet and not all expressions which could be
handled by a single GEMM-like call are correctly detected.
-
+
-Not optimal expression |
-Evaluated as |
-Optimal version (single evaluation) |
-Comments |
+Not optimal expression |
+Evaluated as |
+Optimal version (single evaluation) |
+Comments |
\code
diff --git a/doc/I11_Aliasing.dox b/doc/I11_Aliasing.dox
index 9c6c2ebba..8b08c390c 100644
--- a/doc/I11_Aliasing.dox
+++ b/doc/I11_Aliasing.dox
@@ -20,11 +20,13 @@ to do about it.
Here is a simple example exhibiting aliasing:
-
-Example: \include TopicAliasing_block.cpp
+
+Example | Output |
+
+\include TopicAliasing_block.cpp
|
-Output: \verbinclude TopicAliasing_block.out
+\verbinclude TopicAliasing_block.out
|
The output is not what one would expect. The problem is the assignment
@@ -51,11 +53,13 @@ problem. This means that in general aliasing cannot be detected at compile time.
some instances of aliasing, albeit at run time. The following example exhibiting aliasing was mentioned in
\ref TutorialMatrixArithmetic :
-
-Example: \include tut_arithmetic_transpose_aliasing.cpp
+
+Example | Output |
+
+\include tut_arithmetic_transpose_aliasing.cpp
|
-Output: \verbinclude tut_arithmetic_transpose_aliasing.out
+\verbinclude tut_arithmetic_transpose_aliasing.out
|
Again, the output shows the aliasing issue. However, by default Eigen uses a run-time assertion to detect this
@@ -81,11 +85,13 @@ side. The function \link DenseBase::eval() eval() \endlink does precisely that.
For example, here is the corrected version of the first example above:
-
-Example: \include TopicAliasing_block_correct.cpp
+
+Example | Output |
+
+\include TopicAliasing_block_correct.cpp
|
-Output: \verbinclude TopicAliasing_block_correct.out
+\verbinclude TopicAliasing_block_correct.out
|
Now, \c mat(2,2) equals 5 after the assignment, as it should be.
@@ -96,19 +102,21 @@ better solution. Eigen provides the special-purpose function
\link DenseBase::transposeInPlace() transposeInPlace() \endlink which replaces a matrix by its transpose.
This is shown below:
-
-Example: \include tut_arithmetic_transpose_inplace.cpp
+
+Example | Output |
+
+\include tut_arithmetic_transpose_inplace.cpp
|
-Output: \verbinclude tut_arithmetic_transpose_inplace.out
+\verbinclude tut_arithmetic_transpose_inplace.out
|
-If an xxxInPlace() function is available, then it is best to use it, because it indicate more clearly what you
+If an xxxInPlace() function is available, then it is best to use it, because it indicates more clearly what you
are doing. This may also allow Eigen to optimize more aggressively. These are some of the xxxInPlace()
functions provided:
-
- Original function | In-place function |
+
+Original function | In-place function |
MatrixBase::adjoint() | MatrixBase::adjointInPlace() |
DenseBase::reverse() | DenseBase::reverseInPlace() |
LDLT::solve() | LDLT::solveInPlace() |
diff --git a/doc/I13_FunctionsTakingEigenTypes.dox b/doc/I13_FunctionsTakingEigenTypes.dox
index a6caf539e..6da09491b 100644
--- a/doc/I13_FunctionsTakingEigenTypes.dox
+++ b/doc/I13_FunctionsTakingEigenTypes.dox
@@ -26,11 +26,13 @@ This section will provide simple examples for different types of objects Eigen i
%EigenBase Example
Prints the dimensions of the most generic object present in Eigen. It coulde be any matrix expressions, any dense or sparse matrix and any array.
-
-Example: \include function_taking_eigenbase.cpp
+
+Example: | Output: |
+
+\include function_taking_eigenbase.cpp
|
-Output: \verbinclude function_taking_eigenbase.out
+\verbinclude function_taking_eigenbase.out
|
%DenseBase Example
Prints a sub-block of the dense expression. Accepts any dense matrix or array expression, but no sparse objects and no special matrix classes such as DiagonalMatrix.
diff --git a/doc/QuickReference.dox b/doc/QuickReference.dox
index 467899fb5..70aede0b3 100644
--- a/doc/QuickReference.dox
+++ b/doc/QuickReference.dox
@@ -62,7 +62,8 @@ Matrix // Fully fixed (static allocation)
In most cases, you can simply use one of the convenience typedefs for \ref matrixtypedefs "matrices" and \ref arraytypedefs "arrays". Some examples:
-
+
+Matrices | Arrays |
\code
Matrix <=> MatrixXf
Matrix <=> VectorXd
@@ -537,7 +538,8 @@ Read-write access to sub-matrices: |
\subsection QuickRef_Diagonal Diagonal matrices
-
+
+Operation | Code |
view a vector \link MatrixBase::asDiagonal() as a diagonal matrix \endlink \n | \code
mat1 = vec1.asDiagonal();\endcode
@@ -572,7 +574,8 @@ mat3 = mat1 * diag1.inverse()
TriangularView gives a view on a triangular part of a dense matrix and allows to perform optimized operations on it. The opposite triangular part is never referenced and can be used to store other information.
-
+
+Operation | Code |
Reference to a triangular with optional \n
unit or null diagonal (read/write):
@@ -615,7 +618,8 @@ Just as for triangular matrix, you can reference any triangular part of a square
matrix and perform special and optimized operations. Again the opposite triangular part is never referenced and can be
used to store other information.
-
+
+Operation | Code |
Conversion to a dense matrix:
| \code
| | | |
|
|
|
|
| |