From 00a8d314c592e63aff39e305b6c5f6a6df20ca70 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 26 Aug 2008 19:12:23 +0000 Subject: * move memory related stuff to util/Memory.h * clean ugly doxygen inheritence of expressions * keep improving the documentation... slowly ! --- doc/CustomizingEigen.dox | 2 +- doc/Mainpage.dox | 10 ++- doc/QuickStartGuide.dox | 186 +++++++++++++++++++++++++++++++------------ doc/eigendoxy.css | 14 +++- doc/eigendoxy_header.html.in | 2 +- doc/eigendoxy_tabs.css | 10 +-- 6 files changed, 160 insertions(+), 64 deletions(-) (limited to 'doc') diff --git a/doc/CustomizingEigen.dox b/doc/CustomizingEigen.dox index 74108c999..75981b891 100644 --- a/doc/CustomizingEigen.dox +++ b/doc/CustomizingEigen.dox @@ -4,7 +4,7 @@ namespace Eigen {

Customizing Eigen

-Eigen2 can be extended in several way, for instance, by defining global methods, \link ExtendingMatrixBase by adding custom methods to MatrixBase \endlink, etc. +Eigen2 can be extended in several way, for instance, by defining global methods, \ref ExtendingMatrixBase "by adding custom methods to MatrixBase", etc. \section ExtendingMatrixBase Extending MatrixBase diff --git a/doc/Mainpage.dox b/doc/Mainpage.dox index d03d1d47f..d703358ea 100644 --- a/doc/Mainpage.dox +++ b/doc/Mainpage.dox @@ -2,11 +2,17 @@ namespace Eigen { o /** \mainpage Eigen -This is the API documentation for Eigen. +
\b Overview + | \ref TutorialCore "Core features" + | \ref TutorialGeometry "Geometry" + | \ref TutorialAdvancedLinearAlgebra "Advanced linear algebra" +
+ +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, 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. Finally, you might also have look at the \ref ExampleList "the list of selected examples". +For a first contact with Eigen, the best place is to have a look at the \ref TutorialCore "tutorial". 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. 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 da9be60d2..50abf8b4d 100644 --- a/doc/QuickStartGuide.dox +++ b/doc/QuickStartGuide.dox @@ -1,34 +1,31 @@ namespace Eigen { -/** \page QuickStartGuide +/** \page TutorialCore Tutorial 1/3 - Core features + \ingroup Tutorial -

Quick start guide

+
\ref index "Overview" + | \b Core \b features + | \ref TutorialGeometry "Geometry" + | \ref TutorialAdvancedLinearAlgebra "Advanced linear algebra" +
\b Table \b of \b contents - - Core features (Chapter I) - - \ref SimpleExampleFixedSize - - \ref SimpleExampleDynamicSize - - \ref MatrixTypes - - \ref MatrixInitialization - - \ref BasicLinearAlgebra - - \ref Reductions - - \ref SubMatrix - - \ref MatrixTransformations - - \ref TriangularMatrix - - \ref Performance - - \ref Geometry (Chapter II) - - \ref AdvancedLinearAlgebra (Chapter III) - - \ref LinearSolvers - - \ref LU - - \ref Cholesky - - \ref QR - - \ref EigenProblems - -
+ - \ref TutorialCoreSimpleExampleFixedSize + - \ref TutorialCoreSimpleExampleDynamicSize + - \ref TutorialCoreMatrixTypes + - \ref TutorialCoreMatrixInitialization + - \ref TutorialCoreBasicLinearAlgebra + - \ref TutorialCoreReductions + - \ref TutorialCoreSubMatrix + - \ref TutorialCoreMatrixTransformations + - \ref TutorialCoreTriangularMatrix + - \ref TutorialCorePerformance + +\n
-\section SimpleExampleFixedSize Simple example with fixed-size matrices and vectors +\section TutorialCoreSimpleExampleFixedSize 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). @@ -40,7 +37,9 @@ output: \include Tutorial_simple_example_fixed_size.out -top\section SimpleExampleDynamicSize Simple example with dynamic-size matrices and vectors + + +top\section TutorialCoreSimpleExampleDynamicSize 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. @@ -57,7 +56,7 @@ output: -top\section MatrixTypes Matrix and vector types +top\section TutorialCoreMatrixTypes 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 \ref matrixtypedefs "several convenient typedefs". @@ -66,7 +65,7 @@ The template class Matrix takes a number of template parameters, but for now it \code Matrix \endcode \li \c Scalar is the scalar type, i.e. the type of the coefficients. That is, if you want a vector of floats, choose \c float here. -\li \c RowsAtCompileTime and \c ColsAtCompileTime are the number of rows and columns of the matrix as known at compile-time. +\li \c RowsAtCompileTime and \c ColsAtCompileTime are the number of rows and columns of the matrix as known at compile-time. For example, \c Vector3d is a typedef for \code Matrix \endcode @@ -76,8 +75,10 @@ What if the matrix has dynamic-size i.e. the number of rows or cols isn't known -top\section MatrixInitialization Matrix and vector creation and initialization +top\section TutorialCoreMatrixInitialization Matrix and vector creation and initialization + +\subsection TutorialPredefMat PredefinedMatrix Eigen offers several methods to create or set matrices with coefficients equals to either a constant value, the identity matrix or even random values: @@ -138,6 +139,16 @@ x.setRandom(size); \endcode + +
Basis vectors \link MatrixBase::Unit [details]\endlink
\code +Vector3f::UnixX() // 1 0 0 +Vector3f::UnixY() // 0 1 0 +Vector3f::UnixZ() // 0 0 1 +\endcode\code +VectorXf::Unit(size,i) +VectorXf::Unit(4,1) == Vector4f(0,1,0,0) + == Vector4f::UnitY() +\endcode
Here is an usage example: @@ -159,7 +170,25 @@ v = 6 6 6 \endcode -Eigen also offer a comma initializer syntax which allows to set all the coefficients of a matrix to specific values: + + +\subsection TutorialMap Map +Any memory buffer can be mapped as an Eigen's expression: +
+\code +std::vector stlarray(10); +Map(&stlarray[0], stlarray.size()).setOnes(); +int data[4] = 1, 2, 3, 4; +Matrix2i mat2x2(data); +MatrixXi mat2x2 = Map(data); +MatrixXi mat2x2 = Map(data,2,2); +\endcode +
+ + + +\subsection TutorialCommaInit CommaInitializer +Eigen also offer a comma initializer syntax which allows you to set all the coefficients of a matrix to specific values: @@ -177,16 +206,16 @@ output: \verbinclude Tutorial_commainit_02.out
\include Tutorial_commainit_01.cpp
-

\b Side \b note: here .finished() is used to get the actual matrix object once the comma initialization +\b Side \b note: here .finished() is used to get the actual matrix object once the comma initialization 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.

+Eigen's comma initializer usually yields to very optimized code without any overhead. -top\section BasicLinearAlgebra Basic Linear Algebra +top\section TutorialCoreBasicLinearAlgebra Basic Linear Algebra In short all mathematically well defined operators can be used right away as in the following example: \code @@ -221,7 +250,7 @@ outer product\code mat = vec1 * vec2.transpose();\endcode -\link MatrixBase::cross() cross product \endcode\code +\link MatrixBase::cross() cross product \endlink\code #include vec3 = vec1.cross(vec2);\endcode @@ -287,18 +316,18 @@ mat3 = mat1.cwise().abs2(mat2); -

\b Side \b note: If you feel the \c .cwise() syntax is too verbose for your taste and don't bother to have non mathematical operator directly available feel free to extend MatrixBase as described \ref ExtendingMatrixBase "here".

+\b Side \b note: If you feel the \c .cwise() syntax is too verbose for your taste and don't bother to have non mathematical operator directly available feel free to extend MatrixBase as described \ref ExtendingMatrixBase "here". -top\section Reductions Reductions +top\section TutorialCoreReductions Reductions Eigen provides several several reduction methods such as: -\link Cwise::minCoeff() minCoeff() \endlink, \link Cwise::maxCoeff() maxCoeff() \endlink, -\link Cwise::sum() sum() \endlink, \link Cwise::trace() trace() \endlink, -\link Cwise::norm() norm() \endlink, \link Cwise::norm2() norm2() \endlink, -\link Cwise::all() all() \endlink,and \link Cwise::any() any() \endlink. +\link MatrixBase::minCoeff() minCoeff() \endlink, \link MatrixBase::maxCoeff() maxCoeff() \endlink, +\link MatrixBase::sum() sum() \endlink, \link MatrixBase::trace() trace() \endlink, +\link MatrixBase::norm() norm() \endlink, \link MatrixBase::norm2() norm2() \endlink, +\link MatrixBase::all() all() \endlink,and \link MatrixBase::any() any() \endlink. All reduction operations can be done matrix-wise, \link MatrixBase::colwise() column-wise \endlink or \link MatrixBase::rowwise() row-wise \endlink. Usage example: @@ -316,13 +345,13 @@ mat = 2 7 8 \endcode -

\b Side \b note: The all() and any() functions are especially useful in combinaison with coeff-wise comparison operators (\ref CwiseAll "example").

+\b Side \b note: The all() and any() functions are especially useful in combinaison with coeff-wise comparison operators (\ref CwiseAll "example"). -top\section SubMatrix Sub matrices +top\section TutorialCoreSubMatrix Sub matrices Read-write access to a \link MatrixBase::col(int) column \endlink or a \link MatrixBase::row(int) row \endlink of a matrix: @@ -383,7 +412,7 @@ Read-write access to sub-matrices: -top\section MatrixTransformations Matrix transformations +top\section TutorialCoreMatrixTransformations Matrix transformations
@@ -411,11 +440,11 @@ mat3x3 = mat4x4.minor(i,j);\endcode
-top\section TriangularMatrix Dealing with triangular matrices +top\section TutorialCoreTriangularMatrix Dealing with triangular matrices todo -top\section Performance Notes on performances +top\section TutorialCorePerformance Notes on performances
\code @@ -447,17 +476,70 @@ m4 = m4 * m4.transpose().eval();\endcode forces immediate evaluation of the transpose
-top\section Geometry Geometry features +*/ + + + + + + +/** \page TutorialGeometry Tutorial 2/3 - Geometry + \ingroup Tutorial + +
\ref index "Overview" + | \ref TutorialCore "Core features" + | \b Geometry + | \ref TutorialAdvancedLinearAlgebra "Advanced linear algebra" +
+ +\b Table \b of \b contents + - \ref TutorialGeoRotations + - \ref TutorialGeoTransformation + +top\section TutorialGeoRotations 2D and 3D Rotations + +todo + +top\section TutorialGeoTransformation 2D and 3D Transformations + +todo + +*/ + + + + -maybe a second chapter for that +/** \page TutorialAdvancedLinearAlgebra Tutorial 3/3 - Advanced linear algebra + \ingroup Tutorial -top\section AdvancedLinearAlgebra Advanced Linear Algebra -Again, let's do another chapter for that -\subsection LinearSolvers Solving linear problems -\subsection LU LU -\subsection Cholesky Cholesky -\subsection QR QR -\subsection EigenProblems Eigen value problems +
\ref index "Overview" + | \ref TutorialCore "Core features" + | \ref TutorialGeometry "Geometry" + | \b Advanced \b linear \b algebra +
+ +\b Table \b of \b contents + - \ref TutorialAdvLinearSolvers + - \ref TutorialAdvLU + - \ref TutorialAdvCholesky + - \ref TutorialAdvQR + - \ref TutorialAdvEigenProblems + +\section TutorialAdvLinearSolvers Solving linear problems +todo + +top\section TutorialAdvLU LU +todo + +top\section TutorialAdvCholesky Cholesky +todo + +top\section TutorialAdvQR QR +todo + +top\section TutorialAdvEigenProblems Eigen value problems +todo */ diff --git a/doc/eigendoxy.css b/doc/eigendoxy.css index 825cc4fc1..b64c49ae9 100644 --- a/doc/eigendoxy.css +++ b/doc/eigendoxy.css @@ -451,10 +451,17 @@ A.top { A.top:hover, A.logo:hover { background-color: transparent;font-weight : bolder; } -P.note { +SPAN.note { font-size: 7pt; } +DIV.navigation { + min-height : 64px; +/* background : url("Eigen_Silly_Professor_64x64.png") no-repeat left; */ + padding-left : 80px; + padding-top : 5px; +} + TABLE.noborder { border-bottom-style : none; border-left-style : none; @@ -496,5 +503,10 @@ TABLE.tutorial_code TD { vertical-align: middle; } +DIV.eimainmenu { + text-align: center; +/* border-top: solid; */ +/* border-bottom: solid; */ +} diff --git a/doc/eigendoxy_header.html.in b/doc/eigendoxy_header.html.in index d676645b9..f016a614d 100644 --- a/doc/eigendoxy_header.html.in +++ b/doc/eigendoxy_header.html.in @@ -7,4 +7,4 @@ \ No newline at end of file + style="position:absolute; border:none" /> \ No newline at end of file diff --git a/doc/eigendoxy_tabs.css b/doc/eigendoxy_tabs.css index 1423133bf..00a02138c 100644 --- a/doc/eigendoxy_tabs.css +++ b/doc/eigendoxy_tabs.css @@ -2,13 +2,9 @@ DIV.tabs { - position: absolute; - right: 10pt; - left: 0px; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; - margin-left : 100px; - margin-top : -2em; + float: left; + width:100%; + background : url("tab_b.gif") repeat-x bottom; } DIV.tabs UL -- cgit v1.2.3