aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-01-16 15:43:11 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-01-16 15:43:11 +0100
commit37d45052288f650471f3414d72b56a7e6e715fc2 (patch)
tree1ab6f865daf7fde7723955b917d63cb72a566a1c /Eigen
parent90d5a7c0dd076b7d383ed7284faf6f9073bc9546 (diff)
More documentation improvements.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/AnyMatrixBase.h12
-rw-r--r--Eigen/src/Core/CwiseNullaryOp.h7
-rw-r--r--Eigen/src/Core/DenseStorageBase.h3
-rw-r--r--Eigen/src/Core/Map.h6
-rw-r--r--Eigen/src/Core/Matrix.h62
-rw-r--r--Eigen/src/Core/MatrixBase.h1
-rw-r--r--Eigen/src/Geometry/RotationBase.h4
7 files changed, 41 insertions, 54 deletions
diff --git a/Eigen/src/Core/AnyMatrixBase.h b/Eigen/src/Core/AnyMatrixBase.h
index d1c16923b..cc2f4157c 100644
--- a/Eigen/src/Core/AnyMatrixBase.h
+++ b/Eigen/src/Core/AnyMatrixBase.h
@@ -98,10 +98,14 @@ template<typename Derived> struct AnyMatrixBase
* Implementation of matrix base methods
***************************************************************************/
-/** Copies the generic expression \a other into *this. \returns a reference to *this.
- * The expression must provide a (templated) evalTo(Derived& dst) const function
- * which does the actual job. In practice, this allows any user to write its own
- * special matrix without having to modify MatrixBase */
+/** \brief Copies the generic expression \a other into *this.
+ *
+ * \details The expression must provide a (templated) evalTo(Derived& dst) const
+ * function which does the actual job. In practice, this allows any user to write
+ * its own special matrix without having to modify MatrixBase
+ *
+ * \returns a reference to *this.
+ */
template<typename Derived>
template<typename OtherDerived>
Derived& DenseBase<Derived>::operator=(const AnyMatrixBase<OtherDerived> &other)
diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h
index c326ebae2..53bab77dc 100644
--- a/Eigen/src/Core/CwiseNullaryOp.h
+++ b/Eigen/src/Core/CwiseNullaryOp.h
@@ -667,7 +667,7 @@ EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setIdentity()
return ei_setIdentity_impl<Derived>::run(derived());
}
-/** Resizes to the given size, and writes the identity expression (not necessarily square) into *this.
+/** \brief Resizes to the given size, and writes the identity expression (not necessarily square) into *this.
*
* \param rows the new number of rows
* \param cols the new number of columns
@@ -677,9 +677,8 @@ EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setIdentity()
*
* \sa MatrixBase::setIdentity(), class CwiseNullaryOp, MatrixBase::Identity()
*/
-template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
-EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
-Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setIdentity(int rows, int cols)
+template<typename Derived>
+EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setIdentity(int rows, int cols)
{
Base::resize(rows, cols);
return setIdentity();
diff --git a/Eigen/src/Core/DenseStorageBase.h b/Eigen/src/Core/DenseStorageBase.h
index 562420f86..f3d6e8944 100644
--- a/Eigen/src/Core/DenseStorageBase.h
+++ b/Eigen/src/Core/DenseStorageBase.h
@@ -355,7 +355,8 @@ class DenseStorageBase : public _Base<Derived>
// EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
}
- /** \sa MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&) */
+ /** \copydoc MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&)
+ */
template<typename OtherDerived>
EIGEN_STRONG_INLINE Derived& operator=(const AnyMatrixBase<OtherDerived> &other)
{
diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h
index 18fafdece..f3939c09f 100644
--- a/Eigen/src/Core/Map.h
+++ b/Eigen/src/Core/Map.h
@@ -92,12 +92,6 @@ template<typename MatrixType, int Options> class Map
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
};
-/** Constructor copying an existing array of data.
- * Only for fixed-size matrices and vectors.
- * \param data The array of data to copy
- *
- * \sa Matrix::Map(const Scalar *)
- */
template<typename _Scalar, int _Rows, int _Cols, int _StorageOrder, int _MaxRows, int _MaxCols>
inline Matrix<_Scalar, _Rows, _Cols, _StorageOrder, _MaxRows, _MaxCols>
::Matrix(const Scalar *data)
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h
index 0fe7cb8e2..f309f8abd 100644
--- a/Eigen/src/Core/Matrix.h
+++ b/Eigen/src/Core/Matrix.h
@@ -141,24 +141,11 @@ class Matrix
typedef typename Base::PlainMatrixType PlainMatrixType;
-// friend class Eigen::Map<Matrix, Unaligned>;
-// typedef class Eigen::Map<Matrix, Unaligned> UnalignedMapType;
-// friend class Eigen::Map<Matrix, Aligned>;
-// typedef class Eigen::Map<Matrix, Aligned> AlignedMapType;
-
- protected:
- using Base::m_storage;
-// ei_matrix_storage<Scalar, MaxSizeAtCompileTime, RowsAtCompileTime, ColsAtCompileTime, Options> m_storage;
-
- public:
-#ifndef EIGEN_PARSED_BY_DOXYGEN
enum { NeedsToAlign = (!(Options&DontAlign))
&& SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
-#endif
using Base::base;
- using Base::coeff;
using Base::coeffRef;
/**
@@ -174,7 +161,8 @@ class Matrix
return Base::_set(other);
}
- /** Copies the value of the expression \a other into \c *this with automatic resizing.
+ /** \internal
+ * \brief Copies the value of the expression \a other into \c *this with automatic resizing.
*
* *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized),
* it will be initialized.
@@ -189,11 +177,11 @@ class Matrix
return Base::_set(other);
}
+ /* Here, doxygen failed to copy the brief information when using \copydoc */
+
/**
- * The usage of
- * using Base::operator=;
- * fails on MSVC. Since the code below is working with GCC and MSVC, we skipped
- * the usage of 'using'. This should be done only for operator=.
+ * \brief Copies the generic expression \a other into *this.
+ * \copydetails DenseBase::operator=(const AnyMatrixBase<OtherDerived> &other)
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix& operator=(const AnyMatrixBase<OtherDerived> &other)
@@ -207,7 +195,7 @@ class Matrix
return Base::operator=(func);
}
- /** Default constructor.
+ /** \brief Default constructor.
*
* For fixed-size matrices, does nothing.
*
@@ -223,15 +211,12 @@ class Matrix
EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
}
-#ifndef EIGEN_PARSED_BY_DOXYGEN
// FIXME is it still needed
- /** \internal */
Matrix(ei_constructor_without_unaligned_array_assert)
: Base(ei_constructor_without_unaligned_array_assert())
{ Base::_check_template_params(); EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED }
-#endif
- /** Constructs a vector or row-vector with given dimension. \only_for_vectors
+ /** \brief Constructs a vector or row-vector with given dimension. \only_for_vectors
*
* Note that this is only useful for dynamic-size vectors. For fixed-size vectors,
* it is redundant to pass the dimension here, so it makes more sense to use the default
@@ -255,17 +240,17 @@ class Matrix
Base::template _init2<T0,T1>(x, y);
}
#else
- /** constructs an uninitialized matrix with \a rows rows and \a cols columns.
+ /** \brief Constructs an uninitialized matrix with \a rows rows and \a cols columns.
*
* This is useful for dynamic-size matrices. For fixed-size matrices,
* it is redundant to pass these parameters, so one should use the default constructor
* Matrix() instead. */
Matrix(int rows, int cols);
- /** constructs an initialized 2D vector with given coefficients */
+ /** \brief Constructs an initialized 2D vector with given coefficients */
Matrix(const Scalar& x, const Scalar& y);
#endif
- /** constructs an initialized 3D vector with given coefficients */
+ /** \brief Constructs an initialized 3D vector with given coefficients */
EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z)
{
Base::_check_template_params();
@@ -274,7 +259,7 @@ class Matrix
m_storage.data()[1] = y;
m_storage.data()[2] = z;
}
- /** constructs an initialized 4D vector with given coefficients */
+ /** \brief Constructs an initialized 4D vector with given coefficients */
EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z, const Scalar& w)
{
Base::_check_template_params();
@@ -287,7 +272,7 @@ class Matrix
explicit Matrix(const Scalar *data);
- /** Constructor copying the value of the expression \a other */
+ /** \brief Constructor copying the value of the expression \a other */
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix(const MatrixBase<OtherDerived>& other)
: Base(other.rows() * other.cols(), other.rows(), other.cols())
@@ -295,14 +280,14 @@ class Matrix
Base::_check_template_params();
Base::_set_noalias(other);
}
- /** Copy constructor */
+ /** \brief Copy constructor */
EIGEN_STRONG_INLINE Matrix(const Matrix& other)
: Base(other.rows() * other.cols(), other.rows(), other.cols())
{
Base::_check_template_params();
Base::_set_noalias(other);
}
- /** Copy constructor with in-place evaluation */
+ /** \brief Copy constructor with in-place evaluation */
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix(const ReturnByValue<OtherDerived>& other)
{
@@ -311,7 +296,9 @@ class Matrix
other.evalTo(*this);
}
- /** \sa MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&) */
+ /** \brief Copy constructor for generic expressions.
+ * \sa MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&)
+ */
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix(const AnyMatrixBase<OtherDerived> &other)
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
@@ -323,17 +310,15 @@ class Matrix
*this = other;
}
- /** Override MatrixBase::swap() since for dynamic-sized matrices of same type it is enough to swap the
- * data pointers.
+ /** \internal
+ * \brief Override MatrixBase::swap() since for dynamic-sized matrices
+ * of same type it is enough to swap the data pointers.
*/
template<typename OtherDerived>
void swap(MatrixBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
{ this->_swap(other.derived()); }
- using Base::setIdentity;
- Matrix& setIdentity(int rows, int cols);
-
-/////////// Geometry module ///////////
+ /////////// Geometry module ///////////
template<typename OtherDerived>
explicit Matrix(const RotationBase<OtherDerived,ColsAtCompileTime>& r);
@@ -344,6 +329,9 @@ class Matrix
#ifdef EIGEN_MATRIX_PLUGIN
#include EIGEN_MATRIX_PLUGIN
#endif
+
+ protected:
+ using Base::m_storage;
};
/** \defgroup matrixtypedefs Global matrix typedefs
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index 41c3581b6..b85bece5e 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -247,6 +247,7 @@ template<typename Derived> class MatrixBase
const DiagonalWrapper<Derived> asDiagonal() const;
Derived& setIdentity();
+ Derived& setIdentity(int rows, int cols);
bool isIdentity(RealScalar prec = dummy_precision<Scalar>()) const;
bool isDiagonal(RealScalar prec = dummy_precision<Scalar>()) const;
diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h
index 50dc17311..e8bb16f17 100644
--- a/Eigen/src/Geometry/RotationBase.h
+++ b/Eigen/src/Geometry/RotationBase.h
@@ -115,7 +115,7 @@ struct ei_rotation_base_generic_product_selector<RotationDerived,OtherVectorType
/** \geometry_module
*
- * Constructs a Dim x Dim rotation matrix from the rotation \a r
+ * \brief Constructs a Dim x Dim rotation matrix from the rotation \a r
*/
template<typename _Scalar, int _Rows, int _Cols, int _Storage, int _MaxRows, int _MaxCols>
template<typename OtherDerived>
@@ -128,7 +128,7 @@ Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>
/** \geometry_module
*
- * Set a Dim x Dim rotation matrix from the rotation \a r
+ * \brief Set a Dim x Dim rotation matrix from the rotation \a r
*/
template<typename _Scalar, int _Rows, int _Cols, int _Storage, int _MaxRows, int _MaxCols>
template<typename OtherDerived>