mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
factorize CSS code, make use of the "manual" class when appropriate, clean the style of the big linear algebra table
This commit is contained in:
parent
9e3005d552
commit
6d8e7d68e4
@ -45,7 +45,7 @@ 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="example">
|
||||
<table class="manual">
|
||||
<tr><th>Size set at run time:</th><th>Size set at compile time:</th></tr>
|
||||
<tr><td>
|
||||
\include QuickStart_example2_dynamic.cpp
|
||||
|
@ -42,7 +42,7 @@ 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="example" style="width:100%">
|
||||
<table class="manual" style="width:100%">
|
||||
<tr>
|
||||
<th>Not optimal expression</th>
|
||||
<th>Evaluated as</th>
|
||||
@ -60,7 +60,7 @@ m1.noalias() += m2 * m3; \endcode</td>
|
||||
<td>Use .noalias() to tell Eigen the result and right-hand-sides do not alias.
|
||||
Otherwise the product m2 * m3 is evaluated into a temporary.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="alt">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>\code
|
||||
@ -83,7 +83,7 @@ m1.noalias() += m3.adjoint()
|
||||
<td>This is because the product expression has the EvalBeforeNesting bit which
|
||||
enforces the evaluation of the product by the Tranpose expression.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="alt">
|
||||
<td>\code
|
||||
m1 = m1 + m2 * m3; \endcode</td>
|
||||
<td>\code
|
||||
@ -107,7 +107,7 @@ m1.noalias() += m2 * m3; \endcode</td>
|
||||
so that no temporary is required. (tip: for very small fixed size matrix
|
||||
it is slighlty better to rewrite it like this: m1.noalias() = m2 * m3; m1 += m4;</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="alt">
|
||||
<td>\code
|
||||
m1.noalias() += (s1*m2).block(..) * m3; \endcode</td>
|
||||
<td>\code
|
||||
|
@ -115,14 +115,14 @@ If an xxxInPlace() function is available, then it is best to use it, because it
|
||||
are doing. This may also allow Eigen to optimize more aggressively. These are some of the xxxInPlace()
|
||||
functions provided:
|
||||
|
||||
<table class="example">
|
||||
<table class="manual">
|
||||
<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 class="alt"> <td> DenseBase::reverse() </td> <td> DenseBase::reverseInPlace() </td> </tr>
|
||||
<tr> <td> LDLT::solve() </td> <td> LDLT::solveInPlace() </td> </tr>
|
||||
<tr> <td> LLT::solve() </td> <td> LLT::solveInPlace() </td> </tr>
|
||||
<tr class="alt"> <td> LLT::solve() </td> <td> LLT::solveInPlace() </td> </tr>
|
||||
<tr> <td> TriangularView::solve() </td> <td> TriangularView::solveInPlace() </td> </tr>
|
||||
<tr> <td> DenseBase::transpose() </td> <td> DenseBase::transposeInPlace() </td> </tr>
|
||||
<tr class="alt"> <td> DenseBase::transpose() </td> <td> DenseBase::transposeInPlace() </td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
@ -5,24 +5,24 @@ namespace Eigen {
|
||||
|
||||
\section TopicLinAlgBigTable Catalogue of decompositions offered by Eigen
|
||||
|
||||
<table border="1">
|
||||
<table class="manual-vl">
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5" align="center">Generic information, not Eigen-specific</td>
|
||||
<td colspan="3" align="center">Eigen-specific</td>
|
||||
<th class="meta"></th>
|
||||
<th class="meta" colspan="5">Generic information, not Eigen-specific</th>
|
||||
<th class="meta" colspan="3">Eigen-specific</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Decomposition</td>
|
||||
<td>Requirements on the matrix</td>
|
||||
<td>Speed</td>
|
||||
<td>Algorithm reliability and accuracy</td>
|
||||
<td>Rank-revealing</td>
|
||||
<td>Allows to compute (besides linear solving)</td>
|
||||
<td>Linear solver provided by Eigen</td>
|
||||
<td>Maturity of Eigen's implementation</td>
|
||||
<td>Optimizations</td>
|
||||
<th>Decomposition</th>
|
||||
<th>Requirements on the matrix</th>
|
||||
<th>Speed</th>
|
||||
<th>Algorithm reliability and accuracy</th>
|
||||
<th>Rank-revealing</th>
|
||||
<th>Allows to compute (besides linear solving)</th>
|
||||
<th>Linear solver provided by Eigen</th>
|
||||
<th>Maturity of Eigen's implementation</th>
|
||||
<th>Optimizations</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -37,7 +37,7 @@ namespace Eigen {
|
||||
<td>Blocking</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr class="alt">
|
||||
<td>FullPivLU</td>
|
||||
<td>-</td>
|
||||
<td>Slow</td>
|
||||
@ -61,7 +61,7 @@ namespace Eigen {
|
||||
<td>Blocking</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr class="alt">
|
||||
<td>ColPivHouseholderQR</td>
|
||||
<td>-</td>
|
||||
<td>Fast</td>
|
||||
@ -85,7 +85,7 @@ namespace Eigen {
|
||||
<td>-</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr class="alt">
|
||||
<td>LLT</td>
|
||||
<td>Positive definite</td>
|
||||
<td>Very fast</td>
|
||||
@ -109,7 +109,7 @@ namespace Eigen {
|
||||
<td><em>Soon: blocking</em></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9">\n Singular values and eigenvalues decompositions</td></tr>
|
||||
<tr><th class="inter" colspan="9">\n Singular values and eigenvalues decompositions</th></tr>
|
||||
|
||||
<tr>
|
||||
<td>JacobiSVD (two-sided)</td>
|
||||
@ -171,7 +171,7 @@ namespace Eigen {
|
||||
<td>-</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9">\n Helper decompositions</td></tr>
|
||||
<tr><th class="inter" colspan="9">\n Helper decompositions</th></tr>
|
||||
|
||||
<tr>
|
||||
<td>RealSchur</td>
|
||||
|
@ -700,13 +700,11 @@ img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* class for exemple / output tables */
|
||||
|
||||
table {
|
||||
/* Common style for all Eigen's tables */
|
||||
|
||||
table.example, table.manual, table.manual-vl {
|
||||
max-width:100%;
|
||||
}
|
||||
|
||||
table.example {
|
||||
border-collapse: collapse;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
@ -714,18 +712,51 @@ table.example {
|
||||
font-size: 1em;
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
table.example th {
|
||||
table.example th, table.manual th, table.manual-vl th {
|
||||
padding: 0.5em 0.5em 0.5em 0.5em;
|
||||
text-align: left;
|
||||
padding-right: 1em;
|
||||
background-color: #F2F1DC;
|
||||
color: #555555;
|
||||
background-color: #F4F4E5;
|
||||
|
||||
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.3,#FFFFFF), color-stop(0.30,#FFFFFF), color-stop(0.98,#F4F4E5), to(#ECECDE));
|
||||
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 30%, #F4F4E5 98%, #ECECDE);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#F4F4E5');
|
||||
}
|
||||
|
||||
table.example td, table.manual td, table.manual-vl td {
|
||||
vertical-align:top;
|
||||
border-width: 1px;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
/* header of headers */
|
||||
table th.meta {
|
||||
text-align:center;
|
||||
font-size: 1.2em;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
/* intermediate header */
|
||||
table th.inter {
|
||||
text-align:left;
|
||||
background-color:#FFFFFF;
|
||||
background-image:none;
|
||||
border-style:solid solid solid solid;
|
||||
border-width: 1px;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
/** class for exemple / output tables **/
|
||||
|
||||
table.example {
|
||||
}
|
||||
|
||||
table.example th {
|
||||
}
|
||||
|
||||
table.example td {
|
||||
@ -733,48 +764,35 @@ table.example td {
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
|
||||
/* standard class for the manual */
|
||||
|
||||
table.manual {
|
||||
border-collapse: collapse;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #cccccc;
|
||||
font-size: 1em;
|
||||
|
||||
table.manual, table.manual-vl {
|
||||
padding: 0.2em 0em 0.5em 0em;
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
table.manual th {
|
||||
padding: 0.5em 0.5em 0.5em 0.5em;
|
||||
table.manual th, table.manual-vl th {
|
||||
margin: 0em 0em 0.3em 0em;
|
||||
text-align: left;
|
||||
color: #555555;
|
||||
padding-right: 1em;
|
||||
background-color: #F4F4E5;
|
||||
|
||||
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.3,#FFFFFF), color-stop(0.30,#FFFFFF), color-stop(0.98,#F4F4E5), to(#ECECDE));
|
||||
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 30%, #F4F4E5 98%, #ECECDE);
|
||||
}
|
||||
|
||||
table.manual td {
|
||||
table.manual td, table.manual-vl td {
|
||||
padding: 0.3em 0.5em 0.3em 0.5em;
|
||||
vertical-align:top;
|
||||
border-width: 1px;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
table.manual td.alt, table.manual tr.alt {
|
||||
/*padding: 0.3em 0.5em 0.3em 0.5em;
|
||||
vertical-align:top;*/
|
||||
table.manual td.alt, table.manual tr.alt, table.manual-vl td.alt, table.manual-vl tr.alt {
|
||||
background-color: #F4F4E5;
|
||||
}
|
||||
|
||||
table.manual-vl th, table.manual-vl td, table.manual-vl td.alt {
|
||||
border-color: #cccccc;
|
||||
border-width: 1px;
|
||||
border-style: none solid none solid;
|
||||
}
|
||||
|
||||
table.manual-vl th.inter {
|
||||
border-style: solid solid solid solid;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top:2em;
|
||||
|
Loading…
x
Reference in New Issue
Block a user