From 9fa54d4cc9463be49a134856abec4864c8e39c41 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 19 Oct 2010 08:42:49 -0400 Subject: [PATCH] move tables from class "tutorial_code" to "example" also remove a align="center" in the Aliasing page -- it doesn't make sense to have 1 centered table page when all others are left aligned. --- doc/C00_QuickStartGuide.dox | 6 ++--- doc/C01_TutorialMatrixClass.dox | 2 +- doc/I02_HiPerformance.dox | 10 +++---- doc/I11_Aliasing.dox | 38 ++++++++++++++++----------- doc/I13_FunctionsTakingEigenTypes.dox | 8 +++--- doc/QuickReference.dox | 12 ++++++--- 6 files changed, 45 insertions(+), 31 deletions(-) diff --git a/doc/C00_QuickStartGuide.dox b/doc/C00_QuickStartGuide.dox index e2381f9e3..7d34f4806 100644 --- a/doc/C00_QuickStartGuide.dox +++ b/doc/C00_QuickStartGuide.dox @@ -45,12 +45,12 @@ The following three statements sets the other three entries. The final line outp Here is another example, which combines matrices with vectors. Concentrate on the left-hand program for now; we will talk about the right-hand program later. -
-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: - +
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. -
Example:Output:
\include tut_matrix_assignment_resizing.cpp
+
- - - - + + + +
Not optimal expressionEvaluated asOptimal version (single evaluation)CommentsNot optimal expressionEvaluated asOptimal 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 + + +
ExampleOutput
+\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 + + +
ExampleOutput
+\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 + + +
ExampleOutput
+\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 + + +
ExampleOutput
+\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
+ 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. -
Original functionIn-place function
MatrixBase::adjoint() MatrixBase::adjointInPlace()
DenseBase::reverse() DenseBase::reverseInPlace()
LDLT::solve() LDLT::solveInPlace()
-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: - +
+ \subsection QuickRef_Diagonal Diagonal matrices -
MatricesArrays
\code Matrix <=> MatrixXf Matrix <=> VectorXd @@ -537,7 +538,8 @@ Read-write access to sub-matrices:
+
+
OperationCode
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. - +
+
OperationCode
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. - +
+
OperationCode
Conversion to a dense matrix: \code