diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index eb80fc790..8456b2b78 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -64,10 +64,6 @@ template class Block && startCol >= 0 && BlockCols >= 1 && startCol + BlockCols <= matrix.cols()); } - Block(const Block& other) - : m_matrix(other.m_matrix), - m_startRow(other.m_startRow), m_startCol(other.m_startCol) {} - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block) private: diff --git a/Eigen/src/Core/Cast.h b/Eigen/src/Core/Cast.h index 36886200b..513a070a9 100644 --- a/Eigen/src/Core/Cast.h +++ b/Eigen/src/Core/Cast.h @@ -56,9 +56,6 @@ template class Cast : NoOperatorEquals, Cast(const MatRef& matrix) : m_matrix(matrix) {} - Cast(const Cast& other) - : m_matrix(other.m_matrix) {} - private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -78,7 +75,7 @@ template class Cast : NoOperatorEquals, /** \returns an expression of *this with the \a Scalar type casted to * \a NewScalar. * - * \param NewScalar the type we are casting the scalars to + * The template parameter \a NewScalar is the type we are casting the scalars to. * * Example: \include MatrixBase_cast.cpp * Output: \verbinclude MatrixBase_cast.out @@ -90,7 +87,7 @@ template const Cast MatrixBase::cast() const { - return Cast(static_cast(this)->ref()); + return Cast(ref()); } #endif // EIGEN_CAST_H diff --git a/Eigen/src/Core/Column.h b/Eigen/src/Core/Column.h index e0da29638..30d8ae684 100644 --- a/Eigen/src/Core/Column.h +++ b/Eigen/src/Core/Column.h @@ -60,9 +60,6 @@ template class Column assert(col >= 0 && col < matrix.cols()); } - Column(const Column& other) - : m_matrix(other.m_matrix), m_col(other.m_col) {} - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Column) private: @@ -89,8 +86,8 @@ template class Column /** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0. * - * Example: \include MatrixBase_column.cpp - * Output: \verbinclude MatrixBase_column.out + * Example: \include MatrixBase_col.cpp + * Output: \verbinclude MatrixBase_col.out * * \sa row(), class Column */ template diff --git a/Eigen/src/Core/Conjugate.h b/Eigen/src/Core/Conjugate.h index 3fbe29402..00797c2ff 100644 --- a/Eigen/src/Core/Conjugate.h +++ b/Eigen/src/Core/Conjugate.h @@ -48,9 +48,6 @@ template class Conjugate : NoOperatorEquals, Conjugate(const MatRef& matrix) : m_matrix(matrix) {} - Conjugate(const Conjugate& other) - : m_matrix(other.m_matrix) {} - private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -75,7 +72,7 @@ template const Conjugate MatrixBase::conjugate() const { - return Conjugate(static_cast(this)->ref()); + return Conjugate(ref()); } /** \returns an expression of the adjoint (i.e. conjugate transpose) of *this. diff --git a/Eigen/src/Core/DiagonalCoeffs.h b/Eigen/src/Core/DiagonalCoeffs.h index 1c5353df0..1b9920cdd 100644 --- a/Eigen/src/Core/DiagonalCoeffs.h +++ b/Eigen/src/Core/DiagonalCoeffs.h @@ -48,8 +48,6 @@ template class DiagonalCoeffs DiagonalCoeffs(const MatRef& matrix) : m_matrix(matrix) {} - DiagonalCoeffs(const DiagonalCoeffs& other) : m_matrix(other.m_matrix) {} - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DiagonalCoeffs) private: diff --git a/Eigen/src/Core/Difference.h b/Eigen/src/Core/Difference.h index 815f5b2fb..7ed3bae4d 100644 --- a/Eigen/src/Core/Difference.h +++ b/Eigen/src/Core/Difference.h @@ -41,9 +41,6 @@ template class Difference : NoOperatorEquals, assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols()); } - Difference(const Difference& other) - : m_lhs(other.m_lhs), m_rhs(other.m_rhs) {} - private: static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime, _ColsAtCompileTime = Rhs::ColsAtCompileTime; diff --git a/Eigen/src/Core/DynBlock.h b/Eigen/src/Core/DynBlock.h index c06a33b07..b46bed0eb 100644 --- a/Eigen/src/Core/DynBlock.h +++ b/Eigen/src/Core/DynBlock.h @@ -64,11 +64,6 @@ template class DynBlock && startCol >= 0 && blockCols >= 1 && startCol + blockCols <= matrix.cols()); } - DynBlock(const DynBlock& other) - : m_matrix(other.m_matrix), - m_startRow(other.m_startRow), m_startCol(other.m_startCol), - m_blockRows(other.m_blockRows), m_blockCols(other.m_blockCols) {} - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DynBlock) private: diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index 2fcda3e3d..4558d329d 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -32,14 +32,7 @@ template class Map public: typedef typename MatrixType::Scalar Scalar; friend class MatrixBase >; - - Map(const Scalar* data, int rows, int cols) : m_data(data), m_rows(rows), m_cols(cols) - { - assert(rows > 0 && cols > 0); - } - - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map) - + private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -65,6 +58,17 @@ template class Map else // RowDominant return const_cast(m_data)[col + row * m_cols]; } + + public: + Map(const Scalar* data, int rows, int cols) : m_data(data), m_rows(rows), m_cols(cols) + { + assert(rows > 0 + && (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows) + && cols > 0 + && (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols)); + } + + EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map) protected: const Scalar* m_data; diff --git a/Eigen/src/Core/MatrixRef.h b/Eigen/src/Core/MatrixRef.h index ffdac9d8b..835782b32 100644 --- a/Eigen/src/Core/MatrixRef.h +++ b/Eigen/src/Core/MatrixRef.h @@ -34,7 +34,6 @@ template class MatrixRef friend class MatrixBase; MatrixRef(const MatrixType& matrix) : m_matrix(matrix) {} - MatrixRef(const MatrixRef& other) : m_matrix(other.m_matrix) {} ~MatrixRef() {} EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixRef) diff --git a/Eigen/src/Core/Minor.h b/Eigen/src/Core/Minor.h index ab2e76963..b4fedebe0 100644 --- a/Eigen/src/Core/Minor.h +++ b/Eigen/src/Core/Minor.h @@ -54,9 +54,6 @@ template class Minor && col >= 0 && col < matrix.cols()); } - Minor(const Minor& other) - : m_matrix(other.m_matrix), m_row(other.m_row), m_col(other.m_col) {} - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Minor) private: diff --git a/Eigen/src/Core/Ones.h b/Eigen/src/Core/Ones.h index 36fbe58b0..4aedb7f0f 100644 --- a/Eigen/src/Core/Ones.h +++ b/Eigen/src/Core/Ones.h @@ -32,12 +32,7 @@ template class Ones : NoOperatorEquals, public: typedef typename MatrixType::Scalar Scalar; friend class MatrixBase >; - - Ones(int rows, int cols) : m_rows(rows), m_cols(cols) - { - assert(rows > 0 && cols > 0); - } - + private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -50,6 +45,15 @@ template class Ones : NoOperatorEquals, { return static_cast(1); } + + public: + Ones(int rows, int cols) : m_rows(rows), m_cols(cols) + { + assert(rows > 0 + && (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows) + && cols > 0 + && (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols)); + } protected: int m_rows, m_cols; diff --git a/Eigen/src/Core/Opposite.h b/Eigen/src/Core/Opposite.h index 21be7f614..110b63cf2 100644 --- a/Eigen/src/Core/Opposite.h +++ b/Eigen/src/Core/Opposite.h @@ -36,9 +36,6 @@ template class Opposite : NoOperatorEquals, Opposite(const MatRef& matrix) : m_matrix(matrix) {} - Opposite(const Opposite& other) - : m_matrix(other.m_matrix) {} - private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -60,7 +57,7 @@ template const Opposite MatrixBase::operator-() const { - return Opposite(static_cast(this)->ref()); + return Opposite(ref()); } #endif // EIGEN_OPPOSITE_H diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 4a89e3a99..db261491e 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -75,9 +75,6 @@ template class Product : NoOperatorEquals, assert(lhs.cols() == rhs.rows()); } - Product(const Product& other) - : m_lhs(other.m_lhs), m_rhs(other.m_rhs) {} - private: static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime, _ColsAtCompileTime = Rhs::ColsAtCompileTime; diff --git a/Eigen/src/Core/Random.h b/Eigen/src/Core/Random.h index a8c00c858..6e672709c 100644 --- a/Eigen/src/Core/Random.h +++ b/Eigen/src/Core/Random.h @@ -32,12 +32,7 @@ template class Random : NoOperatorEquals, public: typedef typename MatrixType::Scalar Scalar; friend class MatrixBase >; - - Random(int rows, int cols) : m_rows(rows), m_cols(cols) - { - assert(rows > 0 && cols > 0); - } - + private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -50,6 +45,15 @@ template class Random : NoOperatorEquals, { return random(); } + + public: + Random(int rows, int cols) : m_rows(rows), m_cols(cols) + { + assert(rows > 0 + && (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows) + && cols > 0 + && (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols)); + } protected: int m_rows, m_cols; diff --git a/Eigen/src/Core/Row.h b/Eigen/src/Core/Row.h index 34c6fe3b0..4387b2e6c 100644 --- a/Eigen/src/Core/Row.h +++ b/Eigen/src/Core/Row.h @@ -60,9 +60,6 @@ template class Row assert(row >= 0 && row < matrix.rows()); } - Row(const Row& other) - : m_matrix(other.m_matrix), m_row(other.m_row) {} - template Row& operator=(const MatrixBase& other) { diff --git a/Eigen/src/Core/ScalarMultiple.h b/Eigen/src/Core/ScalarMultiple.h index bcaabb383..29c566977 100644 --- a/Eigen/src/Core/ScalarMultiple.h +++ b/Eigen/src/Core/ScalarMultiple.h @@ -37,9 +37,6 @@ template class ScalarMultiple : NoOper ScalarMultiple(const MatRef& matrix, FactorType factor) : m_matrix(matrix), m_factor(factor) {} - ScalarMultiple(const ScalarMultiple& other) - : m_matrix(other.m_matrix), m_factor(other.m_factor) {} - private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; diff --git a/Eigen/src/Core/Sum.h b/Eigen/src/Core/Sum.h index 6385ced2c..51dc66bfa 100644 --- a/Eigen/src/Core/Sum.h +++ b/Eigen/src/Core/Sum.h @@ -41,8 +41,6 @@ template class Sum : NoOperatorEquals, assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols()); } - Sum(const Sum& other) : m_lhs(other.m_lhs), m_rhs(other.m_rhs) {} - private: static const int _RowsAtCompileTime = Lhs::RowsAtCompileTime, _ColsAtCompileTime = Rhs::ColsAtCompileTime; diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index fb79ea3cd..777e86143 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -48,9 +48,6 @@ template class Transpose Transpose(const MatRef& matrix) : m_matrix(matrix) {} - Transpose(const Transpose& other) - : m_matrix(other.m_matrix) {} - EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose) private: diff --git a/Eigen/src/Core/Zero.h b/Eigen/src/Core/Zero.h index 2d3ec264e..aad2f382d 100644 --- a/Eigen/src/Core/Zero.h +++ b/Eigen/src/Core/Zero.h @@ -32,12 +32,7 @@ template class Zero : NoOperatorEquals, public: typedef typename MatrixType::Scalar Scalar; friend class MatrixBase >; - - Zero(int rows, int cols) : m_rows(rows), m_cols(cols) - { - assert(rows > 0 && cols > 0); - } - + private: static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime, _ColsAtCompileTime = MatrixType::ColsAtCompileTime; @@ -51,6 +46,15 @@ template class Zero : NoOperatorEquals, return static_cast(0); } + public: + Zero(int rows, int cols) : m_rows(rows), m_cols(cols) + { + assert(rows > 0 + && (_RowsAtCompileTime == Dynamic || _RowsAtCompileTime == rows) + && cols > 0 + && (_ColsAtCompileTime == Dynamic || _ColsAtCompileTime == cols)); + } + protected: int m_rows, m_cols; }; diff --git a/Mainpage.dox b/Mainpage.dox index eeb437a58..12aea6202 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -1,16 +1,16 @@ o /** @mainpage Eigen -

If you see this page, then you have not properly generated the documentation.

+

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.

-In order to generate the documentation for Eigen, follow these steps: +In order to generate the documentation of Eigen, please follow these steps:
  • make sure you have the required software installed: cmake, doxygen, and a C++ compiler.
  • create a new directory, which we will call the "build directory", outside of the Eigen source directory.
  • enter the build directory
  • configure the project:
    cmake -DBUILD_DOC=ON /path/to/source/directory
  • -
  • now generate the documentaion:
    make
    or, if you have two CPUs,
    make -j2
    Note that this will compile the examples, run them, and integrate their output into the documentation. This is why it can take some time.
  • +
  • now generate the documentaion:
    make
    or, if you have two CPUs,
    make -j2
    Note that this will compile the examples, run them, and integrate their output into the documentation, which can take some time.
-You will now find the HTML documentation in the doc/html/ subdirectory of the build directory. +After doing that, you will find the HTML documentation in the doc/html/ subdirectory of the build directory. */ diff --git a/doc/benchmark.cpp b/doc/benchmark.cpp index d21f28403..b2ab9a3b0 100644 --- a/doc/benchmark.cpp +++ b/doc/benchmark.cpp @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) I(i,j) = (i==j); m(i,j) = (i+3*j); } - for(int a = 0; a < 100000000; a++) + for(int a = 0; a < 400000000; a++) { m = I + 0.00005 * (m + m*m); }