From 063d1bb811f5e51fa47e89b43ee230499f5a8fe3 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 29 Aug 2008 16:17:06 +0000 Subject: [PATCH] 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.... --- Mainpage.dox | 102 ++++++++++++++++++++++++++++ doc/Doxyfile.in | 8 +-- doc/{Mainpage.dox => Overview.dox} | 0 doc/QuickStartGuide.dox | 14 ++-- doc/apidox_preprocessing.sh | 44 ++++++++++++ doc/snippets/PartialRedux_norm2.cpp | 2 +- 6 files changed, 160 insertions(+), 10 deletions(-) rename doc/{Mainpage.dox => Overview.dox} (100%) create mode 100755 doc/apidox_preprocessing.sh diff --git a/Mainpage.dox b/Mainpage.dox index e036a8283..a67640e28 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -1,3 +1,105 @@ + + +// DOXYGEN_SET_PROJECT_NAME = Eigen +// DOXYGEN_SET_PROJECT_NUMBER = "2.0-beta1 (local)" + +// DOXYGEN_SET_CREATE_SUBDIRS = NO +// DOXYGEN_SET_BRIEF_MEMBER_DESC = YES +// DOXYGEN_SET_REPEAT_BRIEF = YES +// DOXYGEN_SET_ALWAYS_DETAILED_SEC = NO +// DOXYGEN_SET_INLINE_INHERITED_MEMB = NO +// DOXYGEN_SET_FULL_PATH_NAMES = NO +// DOXYGEN_SET_SHORT_NAMES = NO +// DOXYGEN_SET_JAVADOC_AUTOBRIEF = NO +// DOXYGEN_SET_QT_AUTOBRIEF = NO +// DOXYGEN_SET_MULTILINE_CPP_IS_BRIEF = NO +// DOXYGEN_SET_DETAILS_AT_TOP = YES +// DOXYGEN_SET_INHERIT_DOCS = YES +// DOXYGEN_SET_ALIASES = "only_for_vectors=This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column." "array_module=This is defined in the %Array module. \code #include \endcode" "lu_module=This is defined in the %LU module. \code #include \endcode" "cholesky_module=This is defined in the %Cholesky module. \code #include \endcode" "qr_module=This is defined in the %QR module. \code #include \endcode" "svd_module=This is defined in the %SVD module. \code #include \endcode" "geometry_module=This is defined in the %Geometry module. \code #include \endcode" "regression_module=This is defined in the %Regression module. \code #include \endcode" "addexample=\anchor" "label=\bug" +// DOXYGEN_SET_DISTRIBUTE_GROUP_DOC = NO +// DOXYGEN_SET_SUBGROUPING = YES +// DOXYGEN_SET_TYPEDEF_HIDES_STRUCT = NO + +// DOXYGEN_SET_EXTRACT_ALL = NO +// DOXYGEN_SET_EXTRACT_PRIVATE = NO +// DOXYGEN_SET_EXTRACT_STATIC = NO +// DOXYGEN_SET_EXTRACT_LOCAL_CLASSES = NO +// DOXYGEN_SET_EXTRACT_LOCAL_METHODS = NO +// DOXYGEN_SET_EXTRACT_ANON_NSPACES = NO +// DOXYGEN_SET_HIDE_UNDOC_MEMBERS = NO +// DOXYGEN_SET_HIDE_UNDOC_CLASSES = YES +// DOXYGEN_SET_HIDE_FRIEND_COMPOUNDS = YES +// DOXYGEN_SET_HIDE_IN_BODY_DOCS = NO +// DOXYGEN_SET_INTERNAL_DOCS = NO +// DOXYGEN_SET_CASE_SENSE_NAMES = YES +// DOXYGEN_SET_HIDE_SCOPE_NAMES = YES +// DOXYGEN_SET_SHOW_INCLUDE_FILES = YES +// DOXYGEN_SET_INLINE_INFO = YES +// DOXYGEN_SET_SORT_MEMBER_DOCS = YES +// DOXYGEN_SET_SORT_BRIEF_DOCS = YES +// DOXYGEN_SET_SORT_GROUP_NAMES = NO +// DOXYGEN_SET_SORT_BY_SCOPE_NAME = NO +// DOXYGEN_SET_GENERATE_TODOLIST = NO +// DOXYGEN_SET_GENERATE_TESTLIST = NO +// DOXYGEN_SET_GENERATE_BUGLIST = NO +// DOXYGEN_SET_GENERATE_DEPRECATEDLIST= NO +// DOXYGEN_SET_SHOW_USED_FILES = YES +// DOXYGEN_SET_SHOW_DIRECTORIES = NO +// DOXYGEN_SET_SHOW_FILES = YES +// DOXYGEN_SET_SHOW_NAMESPACES = NO + +// DOXYGEN_SET_WARN_IF_UNDOCUMENTED = NO +// DOXYGEN_SET_WARN_NO_PARAMDOC = NO + +// DOXYGEN_SET_INPUT = @topdir@/eigen2/doc/examples/ @topdir@/eigen2/doc/snippets/ @topdir@/eigen2/Eigen @topdir@/eigen2/doc + +// DOXYGEN_SET_EXAMPLE_PATH = @topdir@/eigen2/doc/snippets/ @topdir@/eigen2/doc/examples/ eigen2/out/ + +// DOXYGEN_SET_FILE_PATTERNS = * +// DOXYGEN_SET_RECURSIVE = NO +// DOXYGEN_SET_FILTER_PATTERNS = *.cpp=@topdir@/eigen2/doc/apidox_preprocessing.sh +// DOXYGEN_SET_FILTER_SOURCE_FILES = YES + +// DOXYGEN_SET_SOURCE_BROWSER = NO +// DOXYGEN_SET_INLINE_SOURCES = NO +// DOXYGEN_SET_STRIP_CODE_COMMENTS = YES +// DOXYGEN_SET_REFERENCED_BY_RELATION = YES +// DOXYGEN_SET_REFERENCES_RELATION = YES +// DOXYGEN_SET_REFERENCES_LINK_SOURCE = YES +// DOXYGEN_SET_VERBATIM_HEADERS = YES + +// DOXYGEN_SET_ALPHABETICAL_INDEX = NO + +// DOXYGEN_SET_HTML_ALIGN_MEMBERS = YES +// DOXYGEN_SET_GENERATE_TREEVIEW = NO +// DOXYGEN_SET_FORMULA_FONTSIZE = 12 + +// DOXYGEN_SET_GENERATE_LATEX = NO + +// DOXYGEN_SET_ENABLE_PREPROCESSING = YES +// DOXYGEN_SET_MACRO_EXPANSION = YES +// DOXYGEN_SET_EXPAND_ONLY_PREDEF = YES +// DOXYGEN_SET_SEARCH_INCLUDES = YES +// DOXYGEN_SET_PREDEFINED = EIGEN_EMPTY_STRUCT EIGEN_PARSED_BY_DOXYGEN EIGEN_VECTORIZE EIGEN_QT_SUPPORT +// DOXYGEN_SET_EXPAND_AS_DEFINED = EIGEN_MAKE_SCALAR_OPS EIGEN_MAKE_TYPEDEFS EIGEN_MAKE_TYPEDEFS_ALL_SIZES EIGEN_CWISE_UNOP_RETURN_TYPE EIGEN_CWISE_BINOP_RETURN_TYPE +// DOXYGEN_SET_SKIP_FUNCTION_MACROS = YES + +// DOXYGEN_SET_CLASS_DIAGRAMS = NO +// DOXYGEN_SET_HIDE_UNDOC_RELATIONS = NO +// DOXYGEN_SET_HAVE_DOT = NO +// DOXYGEN_SET_CLASS_GRAPH = NO +// DOXYGEN_SET_COLLABORATION_GRAPH = NO +// DOXYGEN_SET_GROUP_GRAPHS = NO +// DOXYGEN_SET_UML_LOOK = NO +// DOXYGEN_SET_TEMPLATE_RELATIONS = NO +// DOXYGEN_SET_INCLUDE_GRAPH = NO +// DOXYGEN_SET_INCLUDED_BY_GRAPH = NO +// DOXYGEN_SET_CALL_GRAPH = NO +// DOXYGEN_SET_CALLER_GRAPH = NO +// DOXYGEN_SET_GRAPHICAL_HIERARCHY = NO +// DOXYGEN_SET_DIRECTORY_GRAPH = NO + + o /** \mainpage Eigen

If you see this page, then you have not properly generated the documentation. Namely, you have run doxygen from the source directory, which is not appropriate for generating the documentation of Eigen.

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/Overview.dox similarity index 100% rename from doc/Mainpage.dox rename to doc/Overview.dox 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;