diff options
-rw-r--r-- | Doxyfile | 281 | ||||
-rw-r--r-- | Mainpage.dox | 123 | ||||
-rw-r--r-- | doc/benchmark.cpp | 23 | ||||
-rw-r--r-- | doc/examples/function_dynBlock.cpp | 19 | ||||
-rw-r--r-- | src/Core/Cast.h | 2 | ||||
-rw-r--r-- | src/Core/Column.h | 2 | ||||
-rw-r--r-- | src/Core/DynBlock.h | 10 | ||||
-rw-r--r-- | src/Core/MatrixBase.h | 12 | ||||
-rw-r--r-- | src/Core/Minor.h | 3 | ||||
-rw-r--r-- | src/Core/Row.h | 2 |
10 files changed, 466 insertions, 11 deletions
diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000000000..d009f348c --- /dev/null +++ b/Doxyfile @@ -0,0 +1,281 @@ +# Doxyfile 1.5.3 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = Eigen +PROJECT_NUMBER = 2.0-alpha1 +OUTPUT_DIRECTORY = ./ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = NO +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = YES +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = YES +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = src/ ./ +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.C \ + *.CC \ + *.C++ \ + *.II \ + *.I++ \ + *.H \ + *.HH \ + *.H++ \ + *.CS \ + *.PHP \ + *.PHP3 \ + *.M \ + *.MM \ + *.PY +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = doc/examples/ +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/Mainpage.dox b/Mainpage.dox new file mode 100644 index 000000000..591754bba --- /dev/null +++ b/Mainpage.dox @@ -0,0 +1,123 @@ +o /** @mainpage Eigen + +<h2>Table of contents</h2> +<a href="#overview">Overview</a><br/> +<a href="#license">License</a><br/> +<a href="#features">Features</a><br/> +<a href="#news">News</a><br/> +<a href="#download">Download</a><br/> +<a href="#kde">Relation to KDE</a><br/> +<a href="#examples">Examples</a><br/> +<a href="#applications">Applications using Eigen</a><br/> +<a href="#authors">Authors</a><br/> +<a href="#contact">Contact us</a><br/> +<a href="#mailinglist">Mailing list</a><br/> + +<a name="overview"></a> +<h2>Overview</h2> + +Eigen is a C++ template library for vector and matrix math, a.k.a. linear algebra. It aims to concile speed, ease of use, and completeness. + +<a name="license"></a> +<h2>License</h2> + + Eigen is distributed under the GPL, version 2 or later, but with an <a href="#exception">exception allowing any software to use it</a>. Thus, to the question +"Can my own project use Eigen?", the answer is a definite <b>yes</b>. + +Eigen's <a href="#exception">exception</a> is modeled after the one of the GNU C++ Standard Library, but is simpler and more liberal. + +This is similar to the LGPL in spirit. The reason why we don't use the LGPL is that, as of version 2, it doesn't make sense for a pure template library like Eigen, where all the code is in headers. + +<a name="features"></a> +<h2>Features</h2> + +WARNING: this alpha release is NOT feature complete -- far from it! It contains only the Core module, while several other modules are planned. + +<ul> + <li>Add items</li> + <li>Add more items</li> +</ul> + +<a name="news"></a> +<h2>News</h2> + +If you want to stay informed of Eigen news and releases, please subscribe to our <a href="#mailinglist">mailing list</a>. You can also browse the <a href="http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/">archive</a>. + +<a name="download"></a> +<h2>Download</h2> +The source code of the latest release is here: <a href="http://download.tuxfamily.org/eigen/eigen-2.0-alpha1.tar.gz">eigen-2.0-alpha1.tar.gz</a><br/> + +Alternatively, you can checkout the development tree by anonymous svn, by doing: +<pre>svn co svn://anonsvn.kde.org/home/kde/branches/work/eigen2</pre> +or view it online at this address: +<a href="http://websvn.kde.org/branches/work/eigen2">http://websvn.kde.org/branches/work/eigen2</a> + +<a name="kde"></a> +<h2>Relation to KDE</h2> + +First of all: Eigen doesn't have any dependency. In particular, it doesn't depend on any part of KDE or on Qt.<br/> + +Eigen is part of the KDE project, in the sense that: +<ul> + <li>Its <a href="http://websvn.kde.org/trunk/kdesupport/eigen/">development tree</a> is hosted in the <a href="http://websvn.kde.org">KDE repository</a>.</li> + <li>It has been founded by, and is developed by KDE people.</li> + <li>It has originally been designed for the needs of KDE applications, especially <a href="http://edu.kde.org/kalzium">Kalzium</a>.</li> +</ul> +However, we quickly realized that Eigen could be useful for non-KDE projects, whence our decision to make sure that it has no dependency on KDE or Qt. + +Although Eigen itself doesn't have any dependency, the unit-tests require Qt. + +<a name="examples"></a> +<h2>Examples</h2> + +TODO: write more examples, update this section. + +<a name="applications"></a> +<h2>Applications using Eigen</h2> + +TODO: update this section + +Please tell us if you know of other interesting projects using Eigen! + +<a name="authors"></a> +<h2>Authors</h2> + +<b>Lead Developer:</b> Benoit Jacob (jacob at math jussieu fr) + +<b>Contributors during the Eigen 2 development process:</b> +<ul> + <li>Michael Olbrich (michael olbrich at gmx net) : initial loop-unrolling metaprogram</li> + <li>Christian Mayer (mail at christianmayer de) : reviewed the source code, made many useful suggestions</li> + <li>and thanks to everyone on the <a href="#mailinglist">mailing list</a> for your input! +</ul> + +<a name="contact"></a> +<h2>Contact us</h2> + +The best way to contact us is by means of our <a href="#mailinglist">mailing list</a>.<br/> +IRC Channel: \#eigen on Freenode.<br/> +Website (you're here): <a href="http://eigen.tuxfamily.org">http://eigen.tuxfamily.org</a><br/> + +<a name="mailinglist"></a> +<h2>Mailing list</h2> + +The Mailing list for Eigen is: eigen at lists tuxfamily org.<br/> + +To subscribe, send a mail with subject "subscribe" to eigen-request at lists tuxfamily org.<br/> +To unsubscribe, send a mail with subject "unsubscribe" to eigen-request at lists tuxfamily org.<br/> + +You can also browse the <a href="http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/">archive</a>. + +<a name="exception"></a> +<h2>Exception to the GPL</h2> +Eigen is licensed under the GNU GPL, version 2 or later, plus the following exception, which is replicated into each of the source files of Eigen: +<pre> +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. This exception does not invalidate any other reasons why a work +// based on this file might be covered by the GNU General Public License. +</pre> + +*/ diff --git a/doc/benchmark.cpp b/doc/benchmark.cpp new file mode 100644 index 000000000..ae2a52e9c --- /dev/null +++ b/doc/benchmark.cpp @@ -0,0 +1,23 @@ +// g++ -O3 -DNDEBUG benchmark.cpp -o benchmark && time ./benchmark + +#include "src/Core.h" + +using namespace std; +USING_EIGEN_DATA_TYPES + +int main(int argc, char *argv[]) +{ + Matrix3d I; + Matrix3d m; + for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) + { + I(i,j) = (i==j); + m(i,j) = (i+3*j); + } + for(int a = 0; a < 100000000; a++) + { + m = I + 0.00005 * (m + m*m); + } + cout << m << endl; + return 0; +} diff --git a/doc/examples/function_dynBlock.cpp b/doc/examples/function_dynBlock.cpp new file mode 100644 index 000000000..bd3cbae1f --- /dev/null +++ b/doc/examples/function_dynBlock.cpp @@ -0,0 +1,19 @@ +#include "../src/Core.h" +USING_EIGEN_DATA_TYPES +using namespace std; +int main(int, char**) +{ + Matrix4d m = Matrix4d::identity(); + m.dynBlock(2,0,2,2) = m.dynBlock(0,0,2,2); + cout << m << endl; + return 0; +} + +/* Output: + +1 0 0 0 +0 1 0 0 +1 0 1 0 +0 1 0 1 + +*/ diff --git a/src/Core/Cast.h b/src/Core/Cast.h index 7dfce45b0..4d6a30159 100644 --- a/src/Core/Cast.h +++ b/src/Core/Cast.h @@ -55,6 +55,8 @@ template<typename NewScalar, typename MatrixType> class Cast : NoOperatorEquals, MatRef m_matrix; }; +/** \returns an expression of *this with the \a Scalar type casted to + * \a NewScalar. */ template<typename Scalar, typename Derived> template<typename NewScalar> const Cast<NewScalar, Derived> diff --git a/src/Core/Column.h b/src/Core/Column.h index 39b8263e7..d1d7f1453 100644 --- a/src/Core/Column.h +++ b/src/Core/Column.h @@ -67,6 +67,8 @@ template<typename MatrixType> class Column const int m_col; }; +/** \returns an expression of the \a i-th column of *this. + * \sa row(int) */ template<typename Scalar, typename Derived> Column<Derived> MatrixBase<Scalar, Derived>::col(int i) const diff --git a/src/Core/DynBlock.h b/src/Core/DynBlock.h index 3fa0e9c9b..b6795151c 100644 --- a/src/Core/DynBlock.h +++ b/src/Core/DynBlock.h @@ -75,6 +75,16 @@ template<typename MatrixType> class DynBlock const int m_startRow, m_startCol, m_blockRows, m_blockCols; }; +/** \returns a dynamic-size expression of a block in *this. + * + * \param startRow the first row in the block + * \param startCol the first column in the block + * \param blockRows the number of rows in the block + * \param blockCols the number of columns in the block + * + * Example: + * \include MatrixBase_dynBlock.cpp + */ template<typename Scalar, typename Derived> DynBlock<Derived> MatrixBase<Scalar, Derived> ::dynBlock(int startRow, int startCol, int blockRows, int blockCols) const diff --git a/src/Core/MatrixBase.h b/src/Core/MatrixBase.h index db8eaadb5..6ca815ef0 100644 --- a/src/Core/MatrixBase.h +++ b/src/Core/MatrixBase.h @@ -46,7 +46,7 @@ * * \code template<typename Scalar, typename Derived> - void printFirstRow(const Eigen::MatrixBase<Scalar, Derived>& m) + void printFirstRow(const Eigen::MatrixBase<Scalar, Derived>& x) { cout << x.row(0) << endl; } @@ -111,21 +111,11 @@ template<typename Scalar, typename Derived> class MatrixBase return this->operator=<Derived>(other); } - /** \returns an expression of *this with the \a Scalar type casted to - * \a NewScalar. */ template<typename NewScalar> const Cast<NewScalar, Derived> cast() const; - /** \returns an expression of the \a i-th row of *this. - * \sa col(int)*/ Row<Derived> row(int i) const; - /** \returns an expression of the \a i-th column of *this. - * \sa row(int) */ Column<Derived> col(int i) const; - /** \return an expression of the (\a row, \a col)-minor of *this, - * i.e. an expression constructed from *this by removing the specified - * row and column. */ Minor<Derived> minor(int row, int col) const; - DynBlock<Derived> dynBlock(int startRow, int startCol, int blockRows, int blockCols) const; template<int BlockRows, int BlockCols> diff --git a/src/Core/Minor.h b/src/Core/Minor.h index 01389ed22..50422c5dd 100644 --- a/src/Core/Minor.h +++ b/src/Core/Minor.h @@ -73,6 +73,9 @@ template<typename MatrixType> class Minor const int m_row, m_col; }; +/** \return an expression of the (\a row, \a col)-minor of *this, + * i.e. an expression constructed from *this by removing the specified + * row and column. */ template<typename Scalar, typename Derived> Minor<Derived> MatrixBase<Scalar, Derived>::minor(int row, int col) const diff --git a/src/Core/Row.h b/src/Core/Row.h index af46dc280..a9168bb45 100644 --- a/src/Core/Row.h +++ b/src/Core/Row.h @@ -75,6 +75,8 @@ template<typename MatrixType> class Row const int m_row; }; +/** \returns an expression of the \a i-th row of *this. + * \sa col(int)*/ template<typename Scalar, typename Derived> Row<Derived> MatrixBase<Scalar, Derived>::row(int i) const |