From 063d1bb811f5e51fa47e89b43ee230499f5a8fe3 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 29 Aug 2008 16:17:06 +0000 Subject: tweak root/Mainpage.dox to make it compatible with kde's doxygen.sh script plus some hacks to compile the examples from doxygen... Hopefully, api.kde.org/eigen2 will be beautiful by tomorrow.... --- doc/Doxyfile.in | 8 +++---- doc/Mainpage.dox | 21 ------------------ doc/Overview.dox | 21 ++++++++++++++++++ doc/QuickStartGuide.dox | 14 ++++++++---- doc/apidox_preprocessing.sh | 44 +++++++++++++++++++++++++++++++++++++ doc/snippets/PartialRedux_norm2.cpp | 2 +- 6 files changed, 79 insertions(+), 31 deletions(-) delete mode 100644 doc/Mainpage.dox create mode 100644 doc/Overview.dox create mode 100755 doc/apidox_preprocessing.sh (limited to 'doc') diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index bcee2591e..8a0e336fb 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -768,8 +768,7 @@ HTML_FILE_EXTENSION = .html # each generated HTML page. If it is left blank doxygen will generate a # standard header. -# ${CMAKE_BINARY_DIR}/doc/eigendoxy_header.html -HTML_HEADER = +HTML_HEADER = ${CMAKE_BINARY_DIR}/doc/eigendoxy_header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a @@ -777,7 +776,7 @@ HTML_HEADER = # the footer has not been customized yet, so let's use the default one # ${CMAKE_BINARY_DIR}/doc/eigendoxy_footer.html -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to @@ -786,8 +785,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! -# ${CMAKE_SOURCE_DIR}/doc/eigendoxy.css -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 deleted file mode 100644 index d703358ea..000000000 --- a/doc/Mainpage.dox +++ /dev/null @@ -1,21 +0,0 @@ -namespace Eigen { - -o /** \mainpage 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 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/Overview.dox b/doc/Overview.dox new file mode 100644 index 000000000..d703358ea --- /dev/null +++ b/doc/Overview.dox @@ -0,0 +1,21 @@ +namespace Eigen { + +o /** \mainpage 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 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 d8a58b208..74ff8780e 100644 --- a/doc/QuickStartGuide.dox +++ b/doc/QuickStartGuide.dox @@ -590,8 +590,14 @@ Vector3f v1, v2; v2 = t.linear() * v1;\endcode\code Vector2f v1, v2; v2 = t.linear() * v1;\endcode -Concatenate two transformations\code -t3 = t1 * t2;\endcode\code +Apply a \em general transformation \n to a \b normal \b vector +(explanations)\code +Matrix{3,2}f normalMatrix = t.linear().inverse().transpose(); +n2 = (normalMatrix * n1).normalize();\endcode +Apply a transformation with \em pure \em rotation \n to a \b normal \b vector +(no scaling, no shear)\code +n2 = t.linear() * n1;\endcode +Concatenate two transformations\code t3 = t1 * t2;\endcode OpenGL compatibility\code glLoadMatrixf(t.data());\endcode\code @@ -634,9 +640,9 @@ t.scale(Vector3f(sx, sy, sz)); t.scale(Vector3f::Constant(s)); t.prescale(Vector3f(sx, sy, sz)); \endcode\code -t.scale(Vector2f(tx, ty)); +t.scale(Vector2f(sx, sy)); t.scale(Vector2f::Constant(s)); -t.prescale(Vector2f(tx, ty)); +t.prescale(Vector2f(sx, sy)); \endcode Applies a shear transformation \n(2D only)\code t.shear(sx,sy); diff --git a/doc/apidox_preprocessing.sh b/doc/apidox_preprocessing.sh new file mode 100755 index 000000000..a611465cb --- /dev/null +++ b/doc/apidox_preprocessing.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +CXX=`which g++` +SRC=$1 +mkdir -p eigen2/out + +if expr match $SRC ".*\/examples\/.*" > /dev/null ; then + +# DST=`echo $SRC | sed 's/examples/out/' | sed 's/cpp$/out/'` + DST=`echo $SRC | sed 's/.*\/examples/eigen2\/out/' | sed 's/cpp$/out/'` + INC=`echo $SRC | sed 's/\/doc\/examples\/.*/\//'` + + if ! test -e $DST || test $SRC -nt $DST ; then + $CXX $SRC -I. -I$INC -o eitmp_example && ./eitmp_example > $DST + rm eitmp_example + fi + +elif expr match $SRC ".*\/snippets\/.*" > /dev/null ; then + +# DST=`echo $SRC | sed 's/snippets/out/' | sed 's/cpp$/out/'` + DST=`echo $SRC | sed 's/.*\/snippets/eigen2\/out/' | sed 's/cpp$/out/'` + INC=`echo $SRC | sed 's/\/doc\/snippets\/.*/\//'` + + if ! test -e $DST || test $SRC -nt $DST ; then + echo "#include " > .ei_in.cpp + echo "#include " >> .ei_in.cpp + echo "#include " >> .ei_in.cpp + echo "#include " >> .ei_in.cpp + echo "#include " >> .ei_in.cpp + echo "using namespace Eigen; using namespace std;" >> .ei_in.cpp + echo "int main(int, char**){cout.precision(3);" >> .ei_in.cpp + cat $SRC >> .ei_in.cpp + echo "return 0;}" >> .ei_in.cpp + echo " " >> .ei_in.cpp + + $CXX .ei_in.cpp -I. -I$INC -o eitmp_example && ./eitmp_example > $DST + rm eitmp_example + rm .ei_in.cpp + fi + +fi + +cat $SRC +exit 0 diff --git a/doc/snippets/PartialRedux_norm2.cpp b/doc/snippets/PartialRedux_norm2.cpp index 9e1692ae3..a077309a3 100644 --- a/doc/snippets/PartialRedux_norm2.cpp +++ b/doc/snippets/PartialRedux_norm2.cpp @@ -1,3 +1,3 @@ Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is the square norm of each row:" << endl << m.rowwise().norm2() << endl; \ No newline at end of file +cout << "Here is the square norm of each row:" << endl << m.rowwise().norm2() << endl; -- cgit v1.2.3