2009-01-12 22:41:12 +08:00
namespace Eigen {
Big changes in Eigen documentation:
- Organize the documentation into "chapters".
- Each chapter include many documentation pages, reference pages organized as modules, and a quick reference page.
- The "Chapters" tree is created using the defgroup/ingroup mechanism, even for the documentation pages (i.e., .dox files for which I added an \eigenManualPage macro that we can switch between \page or \defgroup ).
- Add a "General topics" entry for all pages that do not fit well in the previous "chapters".
- The highlevel struture is managed by a new eigendoxy_layout.xml file.
- remove the "index" and quite useless pages (namespace list, class hierarchy, member list, file list, etc.)
- add the javascript search-engine.
- add the "treeview" panel.
- remove \tableofcontents (replace them by a custom \eigenAutoToc macro to be able to easily re-enable if needed).
- add javascript to automatically generate a TOC from the h1/h2 tags of the current page, and put the TOC in the left side panel.
- overload various javascript function generated by doxygen to:
- remove the root of the treeview
- remove links to section/subsection from the treeview
- automatically expand the "Chapters" section
- automatically expand the current section
- adjust the height of the treeview to take into account the TOC
- always use the default .css file, eigendoxy.css now only includes our modifications
- use Doxyfile to specify our logo
- remove cross references to unsupported modules (temporarily)
2013-01-05 23:37:11 +08:00
/** \eigenManualPage TopicPassingByValue Passing Eigen objects by value to functions
2009-01-12 22:41:12 +08:00
Passing objects by value is almost always a very bad idea in C++, as this means useless copies, and one should pass them by reference instead.
2010-07-04 16:14:47 +08:00
With Eigen, this is even more important: passing \ref TopicFixedSizeVectorizable "fixed-size vectorizable Eigen objects" by value is not only inefficient, it can be illegal or make your program crash! And the reason is that these Eigen objects have alignment modifiers that aren't respected when they are passed by value.
2009-01-12 22:41:12 +08:00
So for example, a function like this, where v is passed by value:
\code
void my_function(Eigen::Vector2d v);
\endcode
needs to be rewritten as follows, passing v by reference:
\code
void my_function(const Eigen::Vector2d& v);
\endcode
Likewise if you have a class having a Eigen object as member:
\code
struct Foo
{
Eigen::Vector2d v;
};
void my_function(Foo v);
\endcode
This function also needs to be rewritten like this:
\code
void my_function(const Foo& v);
\endcode
Note that on the other hand, there is no problem with functions that return objects by value.
*/
}