aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-19 08:42:49 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-19 08:42:49 -0400
commit9fa54d4cc9463be49a134856abec4864c8e39c41 (patch)
tree9eed6e3abf7f221ce2a152754bd687eecbe18859 /doc
parentca4bd5851cd26df7d6cefaa44cb07587adb3d8de (diff)
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/C00_QuickStartGuide.dox6
-rw-r--r--doc/C01_TutorialMatrixClass.dox2
-rw-r--r--doc/I02_HiPerformance.dox10
-rw-r--r--doc/I11_Aliasing.dox38
-rw-r--r--doc/I13_FunctionsTakingEigenTypes.dox8
-rw-r--r--doc/QuickReference.dox12
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.
-<table class="tutorial_code"><tr><td>
-Size set at run time:
+<table class="example">
+<tr><th>Size set at run time:</th><th>Size set at compile time:</th></tr>
+<tr><td>
\include QuickStart_example2_dynamic.cpp
</td>
<td>
-Size set at compile time:
\include QuickStart_example2_fixed.cpp
</td></tr></table>
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:
-<table class="tutorial_code">
+<table class="example">
<tr><th>Example:</th><th>Output:</th></tr>
<tr>
<td>\include tut_matrix_assignment_resizing.cpp </td>
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.
-<table class="tutorial_code" style="width:100%">
+<table class="example" style="width:100%">
<tr>
-<td>Not optimal expression</td>
-<td>Evaluated as</td>
-<td>Optimal version (single evaluation)</td>
-<td>Comments</td>
+<th>Not optimal expression</th>
+<th>Evaluated as</th>
+<th>Optimal version (single evaluation)</th>
+<th>Comments</th>
</tr>
<tr>
<td>\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:
-<table class="tutorial_code"><tr><td>
-Example: \include TopicAliasing_block.cpp
+<table class="example">
+<tr><th>Example</th><th>Output</th></tr>
+<tr><td>
+\include TopicAliasing_block.cpp
</td>
<td>
-Output: \verbinclude TopicAliasing_block.out
+\verbinclude TopicAliasing_block.out
</td></tr></table>
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 :
-<table class="tutorial_code"><tr><td>
-Example: \include tut_arithmetic_transpose_aliasing.cpp
+<table class="example">
+<tr><th>Example</th><th>Output</th></tr>
+<tr><td>
+\include tut_arithmetic_transpose_aliasing.cpp
</td>
<td>
-Output: \verbinclude tut_arithmetic_transpose_aliasing.out
+\verbinclude tut_arithmetic_transpose_aliasing.out
</td></tr></table>
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:
-<table class="tutorial_code"><tr><td>
-Example: \include TopicAliasing_block_correct.cpp
+<table class="example">
+<tr><th>Example</th><th>Output</th></tr>
+<tr><td>
+\include TopicAliasing_block_correct.cpp
</td>
<td>
-Output: \verbinclude TopicAliasing_block_correct.out
+\verbinclude TopicAliasing_block_correct.out
</td></tr></table>
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:
-<table class="tutorial_code"><tr><td>
-Example: \include tut_arithmetic_transpose_inplace.cpp
+<table class="example">
+<tr><th>Example</th><th>Output</th></tr>
+<tr><td>
+\include tut_arithmetic_transpose_inplace.cpp
</td>
<td>
-Output: \verbinclude tut_arithmetic_transpose_inplace.out
+\verbinclude tut_arithmetic_transpose_inplace.out
</td></tr></table>
-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:
-<table class="tutorial_code" align="center">
-<tr> <td> <b>Original function</b> </td> <td> <b>In-place function</b> </td> </tr>
+<table class="example">
+<tr><th>Original function</th><th>In-place function</th></tr>
<tr> <td> MatrixBase::adjoint() </td> <td> MatrixBase::adjointInPlace() </td> </tr>
<tr> <td> DenseBase::reverse() </td> <td> DenseBase::reverseInPlace() </td> </tr>
<tr> <td> LDLT::solve() </td> <td> LDLT::solveInPlace() </td> </tr>
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
<b> %EigenBase Example </b><br/><br/>
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.
-<table class="tutorial_code"><tr><td>
-Example: \include function_taking_eigenbase.cpp
+<table class="example">
+<tr><th>Example:</th><th>Output:</th></tr>
+<tr><td>
+\include function_taking_eigenbase.cpp
</td>
<td>
-Output: \verbinclude function_taking_eigenbase.out
+\verbinclude function_taking_eigenbase.out
</td></tr></table>
<b> %DenseBase Example </b><br/><br/>
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<double, 13, 3> // Fully fixed (static allocation)
</div>
In most cases, you can simply use one of the convenience typedefs for \ref matrixtypedefs "matrices" and \ref arraytypedefs "arrays". Some examples:
-<table class="tutorial_code">
+<table class="example">
+<tr><th>Matrices</th><th>Arrays</th></tr>
<tr><td>\code
Matrix<float,Dynamic,Dynamic> <=> MatrixXf
Matrix<double,Dynamic,1> <=> VectorXd
@@ -537,7 +538,8 @@ Read-write access to sub-matrices:</td></tr>
\subsection QuickRef_Diagonal Diagonal matrices
-<table class="tutorial_code">
+<table class="example">
+<tr><th>Operation</th><th>Code</th></tr>
<tr><td>
view a vector \link MatrixBase::asDiagonal() as a diagonal matrix \endlink \n </td><td>\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.
-<table class="tutorial_code">
+<table class="example">
+<tr><th>Operation</th><th>Code</th></tr>
<tr><td>
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.
-<table class="tutorial_code">
+<table class="example">
+<tr><th>Operation</th><th>Code</th></tr>
<tr><td>
Conversion to a dense matrix:
</td><td>\code