From 70266b4d05d2565326d014f678d6c812edd3e27e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 28 Aug 2008 00:33:58 +0000 Subject: doc + quick bug fix in Matrix ctor --- Eigen/Core | 1 + Eigen/src/Core/Matrix.h | 3 ++- Eigen/src/Core/util/ForwardDeclarations.h | 2 ++ Eigen/src/Core/util/StaticAssert.h | 1 - Eigen/src/Geometry/Rotation.h | 3 +-- doc/QuickStartGuide.dox | 32 ++++++++++++++++++++++--------- doc/eigendoxy.css | 3 +-- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/Eigen/Core b/Eigen/Core index b1b61ebc2..ac00f9354 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -25,6 +25,7 @@ namespace Eigen { */ #include "src/Core/util/Memory.h" + #include "src/Core/NumTraits.h" #include "src/Core/MathFunctions.h" #include "src/Core/GenericPacketMath.h" diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index fb531c1e8..4fce434e9 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -335,7 +335,8 @@ class Matrix inline Matrix(const MatrixBase& other) : m_storage(other.rows() * other.cols(), other.rows(), other.cols()) { - Base::lazyAssign(other.derived()); + ei_assign_selector::run(*this, other.derived()); + //Base::operator=(other.derived()); } /** Copy constructor */ inline Matrix(const Matrix& other) diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index 3d9f99644..8e40bea0f 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -81,6 +81,8 @@ template struct ei_scalar_min_op; template struct ei_scalar_max_op; template struct ei_scalar_random_op; template struct ei_scalar_add_op; +template struct ei_scalar_constant_op; +template struct ei_scalar_identity_op; struct IOFormat; diff --git a/Eigen/src/Core/util/StaticAssert.h b/Eigen/src/Core/util/StaticAssert.h index cf5e7239a..ad46bde46 100644 --- a/Eigen/src/Core/util/StaticAssert.h +++ b/Eigen/src/Core/util/StaticAssert.h @@ -121,5 +121,4 @@ || int(TYPE0::ColsAtCompileTime)==int(TYPE1::ColsAtCompileTime))),\ you_mixed_matrices_of_different_sizes) - #endif // EIGEN_STATIC_ASSERT_H diff --git a/Eigen/src/Geometry/Rotation.h b/Eigen/src/Geometry/Rotation.h index a0421b211..a7127d634 100644 --- a/Eigen/src/Geometry/Rotation.h +++ b/Eigen/src/Geometry/Rotation.h @@ -161,8 +161,7 @@ public: { return m_angle += other.m_angle; } /** Applies the rotation to a 2D vector */ - template - Vector2 operator* (const MatrixBase& vec) const + Vector2 operator* (const Vector2& vec) const { return toRotationMatrix() * vec; } template diff --git a/doc/QuickStartGuide.dox b/doc/QuickStartGuide.dox index a4f2db946..a2fe4f23d 100644 --- a/doc/QuickStartGuide.dox +++ b/doc/QuickStartGuide.dox @@ -187,8 +187,8 @@ MatrixXi mat2x2 = Map(data,2,2); -\subsection TutorialCommaInit CommaInitializer -Eigen also offer a comma initializer syntax which allows you to set all the coefficients of a matrix to specific values: +\subsection TutorialCommaInit Comma initializer +Eigen also offer a \link MatrixBase::operator<<(const Scalar &) comma initializer syntax \endlink which allows you to set all the coefficients of a matrix to specific values: @@ -206,7 +206,8 @@ output: \verbinclude Tutorial_commainit_02.out
\include Tutorial_commainit_01.cpp
-\b Side \b note: here .finished() is used to get the actual matrix object once the comma initialization +\b Side \b note: here \link CommaInitializer::finished() .finished() \endlink +is used to get the actual matrix object once the comma initialization of our temporary submatrix is done. Note that despite the appearant complexity of such an expression Eigen's comma initializer usually yields to very optimized code without any overhead. @@ -263,7 +264,7 @@ most common coefficient wise operators:
- +
Coefficient wise product
Coefficient wise \link Cwise::operator*() product \endlink \code mat3 = mat1.cwise() * mat2; \endcode
@@ -274,11 +275,11 @@ mat3.cwise() -= scalar; \endcode
-Coefficient wise division\code +Coefficient wise \link Cwise::operator/() division \endlink\code mat3 = mat1.cwise() / mat2; \endcode
-Coefficient wise reciprocal\code +Coefficient wise \link Cwise::inverse() reciprocal \endlink\code mat3 = mat1.cwise().inverse(); \endcode
@@ -293,13 +294,17 @@ etc. +
-Trigo:\n sin, cos, tan\code +\b Trigo: \n +\link Cwise::sin sin \endlink, \link Cwise::cos cos \endlink, +\link Cwise::tan tan \endlink\code mat3 = mat1.cwise().sin(); etc. \endcode
-Power:\n pow, square, cube,\n sqrt, exp, log\code +\b Power: \n \link Cwise::pow() pow \endlink, \link Cwise::square square \endlink, +\link Cwise::cube cube \endlink, \n \link Cwise::sqrt sqrt \endlink, +\link Cwise::exp exp \endlink, \link Cwise::log log \endlink \code mat3 = mat1.cwise().square(); mat3 = mat1.cwise().pow(5); mat3 = mat1.cwise().log(); @@ -307,7 +312,9 @@ etc. \endcode
-min, max, absolute value\code +\link Cwise::min min \endlink, \link Cwise::max max \endlink, \n +absolute value (\link Cwise::abs() abs \endlink, \link Cwise::abs2() abs2 \endlink +\code mat3 = mat1.cwise().min(mat2); mat3 = mat1.cwise().max(mat2); mat3 = mat1.cwise().abs(mat2); @@ -428,6 +435,13 @@ mat3 = mat1.conjugate().transpose() * mat2; \endcode
+returns a \link MatrixBase::normalized() normalized \endlink vector \n +\link MatrixBase::normalize() normalize \endlink a vector +\code +vec3 = vec1.normalized(); +vec1.normalize();\endcode +
\link MatrixBase::asDiagonal() make a diagonal matrix \endlink from a vector \n \b Note: this product is automatically optimized !\code mat3 = mat1 * vec2.asDiagonal();\endcode diff --git a/doc/eigendoxy.css b/doc/eigendoxy.css index b64c49ae9..949a1368a 100644 --- a/doc/eigendoxy.css +++ b/doc/eigendoxy.css @@ -452,12 +452,11 @@ A.top:hover, A.logo:hover { background-color: transparent;font-weight : bolder; } SPAN.note { - font-size: 7pt; + font-size: 8.5pt; } DIV.navigation { min-height : 64px; -/* background : url("Eigen_Silly_Professor_64x64.png") no-repeat left; */ padding-left : 80px; padding-top : 5px; } -- cgit v1.2.3