diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-02-13 22:50:57 +0000 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-02-13 22:50:57 +0000 |
commit | 211e1f8044aed132ae578e992eaad6473be301ed (patch) | |
tree | d35082f6f8e6cfd5f61ec342926971cf19cb2f05 | |
parent | d09b94e2ad3b32d7a57f36877b61f0bc2c4b33b1 (diff) |
Improve documentation of plugins.
-rw-r--r-- | Eigen/src/Core/Array.h | 3 | ||||
-rw-r--r-- | Eigen/src/Core/ArrayBase.h | 5 | ||||
-rw-r--r-- | Eigen/src/Core/DenseBase.h | 5 | ||||
-rw-r--r-- | Eigen/src/Core/Matrix.h | 3 | ||||
-rw-r--r-- | Eigen/src/Core/MatrixBase.h | 5 | ||||
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 4 | ||||
-rw-r--r-- | Eigen/src/Eigen2Support/Cwise.h | 3 | ||||
-rw-r--r-- | Eigen/src/Geometry/Transform.h | 11 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseMatrix.h | 8 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseMatrixBase.h | 6 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseVector.h | 4 | ||||
-rw-r--r-- | doc/I00_CustomizingEigen.dox | 8 | ||||
-rw-r--r-- | doc/I14_PreprocessorDirectives.dox | 13 |
13 files changed, 58 insertions, 20 deletions
diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index 598d18910..a3a2167ad 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -37,6 +37,9 @@ * API for the %Matrix class provides easy access to linear-algebra * operations. * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_ARRAY_PLUGIN. + * * \sa \ref TutorialArrayClass, \ref TopicClassHierarchy */ namespace internal { diff --git a/Eigen/src/Core/ArrayBase.h b/Eigen/src/Core/ArrayBase.h index f36883168..9399ac3d1 100644 --- a/Eigen/src/Core/ArrayBase.h +++ b/Eigen/src/Core/ArrayBase.h @@ -42,7 +42,10 @@ template<typename ExpressionType> class MatrixWrapper; * * This class is the base that is inherited by all array expression types. * - * \param Derived is the derived type, e.g., an array or an expression type. + * \tparam Derived is the derived type, e.g., an array or an expression type. + * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_ARRAYBASE_PLUGIN. * * \sa class MatrixBase, \ref TopicClassHierarchy */ diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 91465f026..496218ded 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -34,7 +34,10 @@ * This class is the base that is inherited by all dense objects (matrix, vector, arrays, * and related expression types). The common Eigen API for dense objects is contained in this class. * - * \param Derived is the derived type, e.g., a matrix type or an expression. + * \tparam Derived is the derived type, e.g., a matrix type or an expression. + * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_DENSEBASE_PLUGIN. * * \sa \ref TopicClassHierarchy */ diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 7e3279094..8ae55da6e 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -79,6 +79,9 @@ * m(0, 3) = 3; * \endcode * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_MATRIX_PLUGIN. + * * <i><b>Some notes:</b></i> * * <dl> diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 594fbedf7..f0c7fc7a1 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -38,7 +38,7 @@ * Note that some methods are defined in other modules such as the \ref LU_Module LU module * for all functions related to matrix inversions. * - * \param Derived is the derived type, e.g. a matrix type, or an expression, etc. + * \tparam Derived is the derived type, e.g. a matrix type, or an expression, etc. * * When writing a function taking Eigen objects as argument, if you want your function * to take as argument any matrix, vector, or expression, just let it take a @@ -53,6 +53,9 @@ } * \endcode * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_MATRIXBASE_PLUGIN. + * * \sa \ref TopicClassHierarchy */ template<typename Derived> class MatrixBase diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 06de6ecc3..39dddf773 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -42,6 +42,10 @@ template<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers> struct m /** * \brief %Dense storage base class for matrices and arrays. + * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_PLAINOBJECTBASE_PLUGIN. + * * \sa \ref TopicClassHierarchy */ template<typename Derived> diff --git a/Eigen/src/Eigen2Support/Cwise.h b/Eigen/src/Eigen2Support/Cwise.h index c80f56a69..c619d389c 100644 --- a/Eigen/src/Eigen2Support/Cwise.h +++ b/Eigen/src/Eigen2Support/Cwise.h @@ -55,6 +55,9 @@ * Example: \include MatrixBase_cwise_const.cpp * Output: \verbinclude MatrixBase_cwise_const.out * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_CWISE_PLUGIN. + * * \sa MatrixBase::cwise() const, MatrixBase::cwise() */ template<typename ExpressionType> class Cwise diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 4542eedee..7fed2699c 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -81,15 +81,15 @@ template<typename TransformType> struct transform_take_affine_part; * * \brief Represents an homogeneous transformation in a N dimensional space * - * \param _Scalar the scalar type, i.e., the type of the coefficients - * \param _Dim the dimension of the space - * \param _Mode the type of the transformation. Can be: + * \tparam _Scalar the scalar type, i.e., the type of the coefficients + * \tparam _Dim the dimension of the space + * \tparam _Mode the type of the transformation. Can be: * - Affine: the transformation is stored as a (Dim+1)^2 matrix, * where the last row is assumed to be [0 ... 0 1]. * - AffineCompact: the transformation is stored as a (Dim)x(Dim+1) matrix. * - Projective: the transformation is stored as a (Dim+1)^2 matrix * without any assumption. - * \param _Options can be \b AutoAlign or \b DontAlign. Default is \b AutoAlign + * \tparam _Options can be \b AutoAlign or \b DontAlign. Default is \b AutoAlign * * The homography is internally represented and stored by a matrix which * is available through the matrix() method. To understand the behavior of @@ -177,6 +177,9 @@ template<typename TransformType> struct transform_take_affine_part; * Conversion methods from/to Qt's QMatrix and QTransform are available if the * preprocessor token EIGEN_QT_SUPPORT is defined. * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_TRANSFORM_PLUGIN. + * * \sa class Matrix, class Quaternion */ template<typename _Scalar, int _Dim, int _Mode, int _Options> diff --git a/Eigen/src/Sparse/SparseMatrix.h b/Eigen/src/Sparse/SparseMatrix.h index f6b8407f7..9e7802736 100644 --- a/Eigen/src/Sparse/SparseMatrix.h +++ b/Eigen/src/Sparse/SparseMatrix.h @@ -34,13 +34,15 @@ * This class implements a sparse matrix using the very common compressed row/column storage * scheme. * - * \param _Scalar the scalar type, i.e. the type of the coefficients - * \param _Options Union of bit flags controlling the storage scheme. Currently the only possibility + * \tparam _Scalar the scalar type, i.e. the type of the coefficients + * \tparam _Options Union of bit flags controlling the storage scheme. Currently the only possibility * is RowMajor. The default is 0 which means column-major. - * \param _Index the type of the indices. Default is \c int. + * \tparam _Index the type of the indices. Default is \c int. * * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_SPARSEMATRIX_PLUGIN. */ namespace internal { diff --git a/Eigen/src/Sparse/SparseMatrixBase.h b/Eigen/src/Sparse/SparseMatrixBase.h index 5901dacc2..8695f7343 100644 --- a/Eigen/src/Sparse/SparseMatrixBase.h +++ b/Eigen/src/Sparse/SparseMatrixBase.h @@ -31,10 +31,10 @@ * * \brief Base class of any sparse matrices or sparse expressions * - * \param Derived - * - * + * \tparam Derived * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_SPARSEMATRIXBASE_PLUGIN. */ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> { diff --git a/Eigen/src/Sparse/SparseVector.h b/Eigen/src/Sparse/SparseVector.h index 47af90594..ce4bb51a2 100644 --- a/Eigen/src/Sparse/SparseVector.h +++ b/Eigen/src/Sparse/SparseVector.h @@ -29,10 +29,12 @@ * * \brief a sparse vector class * - * \param _Scalar the scalar type, i.e. the type of the coefficients + * \tparam _Scalar the scalar type, i.e. the type of the coefficients * * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. * + * This class can be extended with the help of the plugin mechanism described on the page + * \ref TopicCustomizingEigen by defining the preprocessor symbol \c EIGEN_SPARSEVECTOR_PLUGIN. */ namespace internal { diff --git a/doc/I00_CustomizingEigen.dox b/doc/I00_CustomizingEigen.dox index 2a3a9b7d6..766ff6f95 100644 --- a/doc/I00_CustomizingEigen.dox +++ b/doc/I00_CustomizingEigen.dox @@ -9,7 +9,7 @@ Eigen can be extended in several ways, for instance, by defining global methods, - \ref InheritingFromMatrix - \ref CustomScalarType -\section ExtendingMatrixBase Extending MatrixBase +\section ExtendingMatrixBase Extending MatrixBase (and other classes) In this section we will see how to add custom methods to MatrixBase. Since all expressions and matrix types inherit MatrixBase, adding a method to MatrixBase make it immediately available to all expressions ! A typical use case is, for instance, to make Eigen compatible with another API. @@ -22,9 +22,11 @@ class MatrixBase { #endif }; \endcode -Therefore to extend MatrixBase with you own methods you just have to create a file with your method declaration and define EIGEN_MATRIXBASE_PLUGIN before you include any Eigen's header file. +Therefore to extend MatrixBase with your own methods you just have to create a file with your method declaration and define EIGEN_MATRIXBASE_PLUGIN before you include any Eigen's header file. -Here is an example of such an extension file: \n +You can extend many of the other classes used in Eigen by defining similarly named preprocessor symbols. For instance, define \c EIGEN_ARRAYBASE_PLUGIN if you want to extend the ArrayBase class. A full list of classes that can be extended in this way and the corresponding preprocessor symbols can be found on our page \ref TopicPreprocessorDirectives. + +Here is an example of an extension file for adding methods to MatrixBase: \n \b MatrixBaseAddons.h \code inline Scalar at(uint i, uint j) const { return this->operator()(i,j); } diff --git a/doc/I14_PreprocessorDirectives.dox b/doc/I14_PreprocessorDirectives.dox index 2dd38d93d..b20b1f000 100644 --- a/doc/I14_PreprocessorDirectives.dox +++ b/doc/I14_PreprocessorDirectives.dox @@ -18,6 +18,8 @@ This page lists the preprocesor tokens recognised by Eigen. - \b EIGEN2_SUPPORT - if defined, enables the Eigen2 compatibility mode. This is meant to ease the transition of Eigen2 to Eigen3 (see \ref Eigen2ToEigen3). Not defined by default. + - \b EIGEN2_SUPPORT_STAGEnn_xxx (for various values of nn and xxx) - staged migration path from Eigen2 to + Eigen3; see \ref Eigen2SupportModes. - \b EIGEN_DEFAULT_TO_ROW_MAJOR - when defined, the default storage order for matrices becomes row-major instead of column-major. Not defined by default. - \b EIGEN_DEFAULT_IO_FORMAT - the IOFormat to use when printing a matrix if no #IOFormat is specified. @@ -60,17 +62,22 @@ It is possible to add new methods to many fundamental classes in Eigen by writin the section \ref ExtendingMatrixBase, the plugin is specified by defining a \c EIGEN_xxx_PLUGIN macro. The following macros are supported; none of them are defined by default. - - \b EIGEN_ARRAYBASE_PLUGIN - filename of plugin for extending the ArrayBase class. - \b EIGEN_ARRAY_PLUGIN - filename of plugin for extending the Array class. + - \b EIGEN_ARRAYBASE_PLUGIN - filename of plugin for extending the ArrayBase class. - \b EIGEN_CWISE_PLUGIN - filename of plugin for extending the Cwise class. - \b EIGEN_DENSEBASE_PLUGIN - filename of plugin for extending the DenseBase class. - - \b EIGEN_MATRIXBASE_PLUGIN - filename of plugin for extending the MatrixBase class. + - \b EIGEN_DYNAMICSPARSEMATRIX_PLUGIN - filename of plugin for extending the DynamicSparseMatrix class. - \b EIGEN_MATRIX_PLUGIN - filename of plugin for extending the Matrix class. + - \b EIGEN_MATRIXBASE_PLUGIN - filename of plugin for extending the MatrixBase class. - \b EIGEN_PLAINOBJECTBASE_PLUGIN - filename of plugin for extending the PlainObjectBase class. - \b EIGEN_QUATERNIONBASE_PLUGIN - filename of plugin for extending the QuaternionBase class. + - \b EIGEN_SPARSEMATRIX_PLUGIN - filename of plugin for extending the SparseMatrix class. + - \b EIGEN_SPARSEMATRIXBASE_PLUGIN - filename of plugin for extending the SparseMatrixBase class. + - \b EIGEN_SPARSEVECTOR_PLUGIN - filename of plugin for extending the SparseVector class. - \b EIGEN_TRANSFORM_PLUGIN - filename of plugin for extending the Transform class. - \b EIGEN_FUNCTORS_PLUGIN - filename of plugin for adding new functors and specializations of functor_traits. + */ -}
\ No newline at end of file +} |