aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-08-24 19:14:20 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-08-24 19:14:20 +0000
commit854d6e8458a379e1583f6e2c835263ca5bdb19a5 (patch)
tree0f17fe963f333f752d77af7edd3fb21aaacc108e /doc
parent251ecc0ab9ee7bf923c5212ab93bdf02dc8156d7 (diff)
Documentation: fill the placeholders, add a custom CSS file,
add a reference to the tutorial in the main page.
Diffstat (limited to 'doc')
-rw-r--r--doc/Doxyfile.in2
-rw-r--r--doc/Mainpage.dox2
-rw-r--r--doc/QuickStartGuide.dox69
-rw-r--r--doc/eigendoxy.css451
-rw-r--r--doc/examples/Tutorial_simple_example_dynamic_size.cpp22
-rw-r--r--doc/examples/Tutorial_simple_example_fixed_size.cpp14
6 files changed, 542 insertions, 18 deletions
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 9e8d6a38e..10c170a32 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -782,7 +782,7 @@ HTML_FOOTER =
# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
-HTML_STYLESHEET =
+HTML_STYLESHEET = ${CMAKE_SOURCE_DIR}/doc/eigendoxy.css
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
diff --git a/doc/Mainpage.dox b/doc/Mainpage.dox
index aef72b042..d03d1d47f 100644
--- a/doc/Mainpage.dox
+++ b/doc/Mainpage.dox
@@ -6,7 +6,7 @@ This is the API documentation for Eigen.
Most of the API is available as methods in MatrixBase, so this is a good starting point for browsing. Also have a look at Matrix, as a few methods and the matrix constructors are there. Other notable classes for the Eigen API are Cwise, which contains the methods for doing certain coefficient-wise operations, and Part.
-For a first contact with Eigen, you might look at the \ref ExampleList "the list of selected examples". Then, it is enough to look at Matrix, MatrixBase, and Cwise. In fact, except for advanced use, the only class that you'll have to explicitly name in your program, i.e. of which you'll explicitly contruct objects, is Matrix. For instance, vectors are handled as a special case of Matrix with one column. Typedefs are provided, e.g. Vector2f is a typedef for Matrix<float, 2, 1>.
+For a first contact with Eigen, the best place is to have a look at the \ref QuickStartGuide "quick start guide". Then, it is enough to look at Matrix, MatrixBase, and Cwise. In fact, except for advanced use, the only class that you'll have to explicitly name in your program, i.e. of which you'll explicitly contruct objects, is Matrix. For instance, vectors are handled as a special case of Matrix with one column. Typedefs are provided, e.g. Vector2f is a typedef for Matrix<float, 2, 1>. Finally, you might also have look at the \ref ExampleList "the list of selected examples".
Most of the other classes are just return types for MatrixBase methods.
diff --git a/doc/QuickStartGuide.dox b/doc/QuickStartGuide.dox
index aa505b91d..e3eb4671f 100644
--- a/doc/QuickStartGuide.dox
+++ b/doc/QuickStartGuide.dox
@@ -1,6 +1,7 @@
namespace Eigen {
/** \page QuickStartGuide
+<a name="top"></a>
<h1>Quick start guide</h1>
@@ -22,6 +23,10 @@ namespace Eigen {
- \ref QR
- \ref EigenProblems
+</br>
+<hr>
+
+
\section SimpleExampleFixedSize Simple example with fixed-size matrices and vectors
By fixed-size, we mean that the number of rows and columns are known at compile-time. In this case, Eigen avoids dynamic memory allocation and unroll loops. This is useful for very small sizes (typically up to 4x4).
@@ -34,7 +39,7 @@ output:
\include Tutorial_simple_example_fixed_size.out
</td></tr></table>
-\section SimpleExampleDynamicSize Simple example with dynamic-size matrices and vectors
+<a href="#" class="top">top</a>\section SimpleExampleDynamicSize Simple example with dynamic-size matrices and vectors
Dynamic-size means that the number of rows and columns are not known at compile-time. In this case, they are stored as runtime variables and the arrays are dynamically allocated.
@@ -46,7 +51,12 @@ output:
\include Tutorial_simple_example_dynamic_size.out
</td></tr></table>
-\section MatrixTypes Matrix and vector types
+
+
+
+
+
+<a href="#" class="top">top</a>\section MatrixTypes Matrix and vector types
In Eigen, all kinds of dense matrices and vectors are represented by the template class Matrix. In most cases you can simply use one of the several convenient typedefs (\ref matrixtypedefs).
@@ -61,7 +71,11 @@ For example, \c Vector3d is a typedef for \code Matrix<double, 3, 1> \endcode
What if the matrix has dynamic-size i.e. the number of rows or cols isn't known at compile-time? Then use the special value Eigen::Dynamic. For example, \c VectorXd is a typedef for \code Matrix<double, Dynamic, 1> \endcode
-\section MatrixInitialization Matrix and vector creation and initialization
+
+
+
+
+<a href="#" class="top">top</a>\section MatrixInitialization Matrix and vector creation and initialization
To get a matrix with all coefficients equals to a given value you can use the Matrix::Constant() function, e.g.:
<table><tr><td>
@@ -169,7 +183,12 @@ Here .finished() is used to get the actual matrix object once the comma initiali
of our temporary submatrix is done. Note that despite the appearant complexity of such an expression
Eigen's comma initializer usually yields to very optimized code without any overhead.
-\section BasicLinearAlgebra Basic Linear Algebra
+
+
+
+
+
+<a href="#" class="top">top</a>\section BasicLinearAlgebra Basic Linear Algebra
In short all mathematically well defined operators can be used right away as in the following example:
\code
@@ -267,7 +286,12 @@ mat3 = mat1.cwise().abs2(mat2);
\endcode</td></tr>
</table>
-\section Reductions Reductions
+
+
+
+
+
+<a href="#" class="top">top</a>\section Reductions Reductions
Reductions can be done matrix-wise,
\link MatrixBase::colwise() column-wise \endlink or
@@ -280,16 +304,17 @@ Reductions can be done matrix-wise,
9 4 6
\endcode
</td></tr>
-<tr><td>\code mat.minCoeff(); \endcode</td><td>\code 1 \endcode</td></tr>
-<tr><td>\code mat.maxCoeff(); \endcode</td><td>\code 9 \endcode</td></tr>
-<tr><td>\code mat.colwise().minCoeff(); \endcode</td><td>\code 2 3 1 \endcode</td></tr>
-<tr><td>\code mat.colwise().maxCoeff(); \endcode</td><td>\code 9 7 8 \endcode</td></tr>
+
+<tr><td>\code mat.minCoeff(); \endcode</td><td>\code 1 \endcode</td><td></td>
+ <td>\code mat.maxCoeff(); \endcode</td><td>\code 9 \endcode</td></tr>
+<tr><td>\code mat.colwise().minCoeff(); \endcode</td><td>\code 2 3 1 \endcode</td><td></td>
+ <td>\code mat.colwise().maxCoeff(); \endcode</td><td>\code 9 7 8 \endcode</td></tr>
<tr><td>\code mat.rowwise().minCoeff(); \endcode</td><td>\code
1
2
4
-\endcode</td></tr>
-<tr><td>\code mat.rowwise().maxCoeff(); \endcode</td><td>\code
+\endcode</td><td></td>
+ <td>\code mat.rowwise().maxCoeff(); \endcode</td><td>\code
5
8
9
@@ -303,7 +328,9 @@ The all() and any() functions are especially useful in combinaison with coeff-wi
-\section SubMatrix Sub matrices
+
+
+<a href="#" class="top">top</a>\section SubMatrix Sub matrices
Read-write access to a \link MatrixBase::col(int) column \endlink
or a \link MatrixBase::row(int) row \endlink of a matrix:
@@ -354,19 +381,29 @@ Read-write access to sub-matrices:
</table>
-\section MatrixTransformations Matrix transformations
+
+
+
+<a href="#" class="top">top</a>\section MatrixTransformations Matrix transformations
transpose, adjoint, etc...
-\section Geometry Geometry features
+
+
+
+<a href="#" class="top">top</a>\section Geometry Geometry features
maybe a second tutorial for that
-\section Performance Notes on performances
-\section AdvancedLinearAlgebra Advanced Linear Algebra
+
+
+<a href="#" class="top">top</a>\section Performance Notes on performances
+
+
+<a href="#" class="top">top</a>\section AdvancedLinearAlgebra Advanced Linear Algebra
\subsection LinearSolvers Solving linear problems
\subsection LU LU
diff --git a/doc/eigendoxy.css b/doc/eigendoxy.css
new file mode 100644
index 000000000..6ae31dde7
--- /dev/null
+++ b/doc/eigendoxy.css
@@ -0,0 +1,451 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+ font-size: 90%;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+ background-color : #d8d6af; margin-top : 2em;
+}
+H3 {
+ font-size: 100%;
+}
+CAPTION {
+ font-weight: bold
+}
+DIV.qindex {
+ width: 100%;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.navpath {
+ width: 100%;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.navtab {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+TD.navtab {
+ font-size: 70%;
+}
+A.qindex {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D;
+}
+A.qindex:visited {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D
+}
+A.qindex:hover {
+ text-decoration: none;
+ background-color: #ddddff;
+}
+A.qindexHL {
+ text-decoration: none;
+ font-weight: bold;
+ background-color: #6666cc;
+ color: #ffffff;
+ border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff;
+}
+A.qindexHL:visited {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff
+}
+A.el {
+ text-decoration: none;
+ font-weight: bold
+}
+A.elRef {
+ font-weight: bold
+}
+A.code:link {
+ text-decoration: none;
+ font-weight: normal;
+ color: #0000FF
+}
+A.code:visited {
+ text-decoration: none;
+ font-weight: normal;
+ color: #0000FF
+}
+A.codeRef:link {
+ font-weight: normal;
+ color: #0000FF
+}
+A.codeRef:visited {
+ font-weight: normal;
+ color: #0000FF
+}
+A:hover {
+ text-decoration: none;
+ background-color: #f2f2ff
+}
+DL.el {
+ margin-left: -1cm
+}
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 95%;
+}
+PRE.fragment {
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
+ margin-top: 4px;
+ margin-bottom: 4px;
+ margin-left: 2px;
+ margin-right: 8px;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+DIV.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px
+}
+
+DIV.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ margin-bottom: 6px;
+ font-weight: bold;
+}
+DIV.groupText {
+ margin-left: 16px;
+ font-style: italic;
+ font-size: 90%
+}
+BODY {
+ background: white;
+ color: black;
+ margin-right: 20px;
+ margin-left: 20px;
+}
+TD.indexkey {
+ background-color: #e8eef2;
+ font-weight: bold;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+ background-color: #e8eef2;
+ font-style: italic;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TR.memlist {
+ background-color: #f0f0f0;
+}
+P.formulaDsp {
+ text-align: center;
+}
+IMG.formulaDsp {
+}
+IMG.formulaInl {
+ vertical-align: middle;
+}
+SPAN.keyword { color: #008000 }
+SPAN.keywordtype { color: #604020 }
+SPAN.keywordflow { color: #e08000 }
+SPAN.comment { color: #800000 }
+SPAN.preprocessor { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral { color: #008080 }
+SPAN.vhdldigit { color: #ff00ff }
+SPAN.vhdlchar { color: #000000 }
+SPAN.vhdlkeyword { color: #700070 }
+SPAN.vhdllogic { color: #ff0000 }
+
+.mdescLeft {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.mdescRight {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.memItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplParams {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ color: #606060;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+FORM.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+INPUT.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+TD.tiny {
+ font-size: 75%;
+}
+a {
+ color: #1A41A8;
+}
+a:visited {
+ color: #2A3798;
+}
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #84b0c7;
+}
+TH.dirtab {
+ background: #e8eef2;
+ font-weight: bold;
+}
+HR {
+ height: 1px;
+ border: none;
+ border-top: 1px solid black;
+}
+
+/* Style for detailed member documentation */
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+.memitem {
+ padding: 4px;
+ background-color: #eef3f5;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #dedeee;
+ -moz-border-radius: 8px 8px 8px 8px;
+}
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+.memdoc{
+ padding-left: 10px;
+}
+.memproto {
+ background-color: #d5e1e8;
+ width: 100%;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #84b0c7;
+ font-weight: bold;
+ -moz-border-radius: 8px 8px 8px 8px;
+}
+.paramkey {
+ text-align: right;
+}
+.paramtype {
+ white-space: nowrap;
+}
+.paramname {
+ color: #602020;
+ font-style: italic;
+ white-space: nowrap;
+}
+/* End Styling for detailed member documentation */
+
+/* for the tree view */
+.ftvtree {
+ font-family: sans-serif;
+ margin:0.5em;
+}
+.directory {
+ font-size: 9pt;
+ font-weight: bold;
+}
+.directory h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+.directory > h3 {
+ margin-top: 0;
+}
+.directory p {
+ margin: 0px;
+ white-space: nowrap;
+}
+.directory div {
+ display: none;
+ margin: 0px;
+}
+.directory img {
+ vertical-align: -30%;
+}
+
+H2 A {
+ font-size: 130%;margin:10px 0 1em 1em;display:block;
+}
+H2 A:hover {
+ background-color: #d8d6af
+}
+A.top {
+ font-size: 120%;
+ display:block;
+ color: #666666;
+ position:absolute;
+ right:2em;
+ margin:17px 0 0 0;
+}
+A.top:hover {
+ background-color: #d8d6af;font-weight : bolder;
+}
diff --git a/doc/examples/Tutorial_simple_example_dynamic_size.cpp b/doc/examples/Tutorial_simple_example_dynamic_size.cpp
new file mode 100644
index 000000000..93486e6a0
--- /dev/null
+++ b/doc/examples/Tutorial_simple_example_dynamic_size.cpp
@@ -0,0 +1,22 @@
+#include <Eigen/Core>
+
+// import most common Eigen's types
+USING_PART_OF_NAMESPACE_EIGEN
+
+int main(int argc, char *argv[])
+{
+ for (int size=1; size<=4; ++size)
+ {
+ MatrixXi m(size,size+1); // creates a size x (size+1) matrix of int
+ for (int j=0; j<m.cols(); ++j) // loop over the columns
+ for (int i=0; i<m.rows(); ++i) // loop over the rows
+ m(i,j) = i+j*m.rows(); // to access matrix elements use operator (int,int)
+ std::cout << m << "\n\n";
+ }
+
+ VectorXf v4(4);
+ // to access vector elements
+ // you can use either operator () or operator []
+ v4[0] = 1; v4[1] = 2; v4(2) = 3; v4(3) = 4;
+ std::cout << "\nv4:\n" << v4 << std::endl;
+}
diff --git a/doc/examples/Tutorial_simple_example_fixed_size.cpp b/doc/examples/Tutorial_simple_example_fixed_size.cpp
new file mode 100644
index 000000000..e3691d83a
--- /dev/null
+++ b/doc/examples/Tutorial_simple_example_fixed_size.cpp
@@ -0,0 +1,14 @@
+#include <Eigen/Core>
+
+// import most common Eigen's types
+USING_PART_OF_NAMESPACE_EIGEN
+
+int main(int argc, char *argv[])
+{
+ Matrix3f m3;
+ m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
+ Matrix4f m4 = Matrix4f::Identity();
+ Vector4i v4(1, 2, 3, 4);
+
+ std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << "\nv4:\n" << v4 << std::endl;
+} \ No newline at end of file