aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-08-12 02:14:02 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-08-12 02:14:02 +0000
commit13ad88736e41cd22d057f67e39ba694be76f7010 (patch)
treed61adf7ab2edd10ae60d113b64dcb20547276265 /Eigen
parentf04c1cb774fae209c6d4d060bda15f7389764887 (diff)
last small fixes, this is alpha6, eigen2 is now ready for eigen1 apps to
port to.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/CoreDeclarations5
-rw-r--r--Eigen/Geometry1
-rw-r--r--Eigen/src/Core/MatrixBase.h3
-rw-r--r--Eigen/src/Geometry/OrthoMethods.h11
4 files changed, 14 insertions, 6 deletions
diff --git a/Eigen/CoreDeclarations b/Eigen/CoreDeclarations
index f4b8fa8c8..7f391f676 100644
--- a/Eigen/CoreDeclarations
+++ b/Eigen/CoreDeclarations
@@ -17,14 +17,17 @@
#include <pmmintrin.h>
#endif
#ifdef __SSSE3__
- #include <tmmintrin.h>
+ #include <tmmintrin.h>
#endif
+
+/*** Disable AltiVec code for now as it's out of date
#elif (defined __ALTIVEC__)
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_ALTIVEC
#include <altivec.h>
// We _need_ to #undef bool as it's defined in <altivec.h> for some reason.
#undef bool
+***/
#endif
#endif
diff --git a/Eigen/Geometry b/Eigen/Geometry
index 4d7b3f3d4..7a3ca9ede 100644
--- a/Eigen/Geometry
+++ b/Eigen/Geometry
@@ -9,6 +9,7 @@ namespace Eigen {
* This module provides support for:
* - fixed-size homogeneous transformations
* - 2D and 3D rotations
+ * - quaternions
* - \ref MatrixBase::cross() "cross product"
* - \ref MatrixBase::someOrthognal() "orthognal vector generation"
*
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index 2d4c8b08d..c1bb99141 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -462,6 +462,9 @@ template<typename Derived> class MatrixBase
template<typename NewType>
const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived> cast() const;
+ /** \returns the matrix or vector obtained by evaluating this expression.
+ *
+ */
EIGEN_ALWAYS_INLINE const typename ei_eval<Derived>::type eval() const
{
return typename ei_eval<Derived>::type(derived());
diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h
index b6206f7b2..57864afec 100644
--- a/Eigen/src/Geometry/OrthoMethods.h
+++ b/Eigen/src/Geometry/OrthoMethods.h
@@ -47,10 +47,11 @@ MatrixBase<Derived>::cross(const MatrixBase<OtherDerived>& other) const
}
template<typename Derived, int Size = Derived::SizeAtCompileTime>
-struct ei_perpendicular_selector
+struct ei_someOrthogonal_selector
{
typedef typename ei_eval<Derived>::type VectorType;
typedef typename ei_traits<Derived>::Scalar Scalar;
+ typedef typename NumTraits<Scalar>::Real RealScalar;
inline static VectorType run(const Derived& src)
{
VectorType perp;
@@ -64,7 +65,7 @@ struct ei_perpendicular_selector
if((!ei_isMuchSmallerThan(src.x(), src.z()))
|| (!ei_isMuchSmallerThan(src.y(), src.z())))
{
- Scalar invnm = Scalar(1)/src.template start<2>().norm();
+ RealScalar invnm = Scalar(1)/src.template start<2>().norm();
perp.template start<3>() << -ei_conj(src.y())*invnm, ei_conj(src.x())*invnm, 0;
}
/* if both x and y are close to zero, then the vector is close
@@ -73,7 +74,7 @@ struct ei_perpendicular_selector
*/
else
{
- Scalar invnm = Scalar(1)/src.template end<2>().norm();
+ RealScalar invnm = Scalar(1)/src.template end<2>().norm();
perp.template start<3>() << 0, -ei_conj(src.z())*invnm, ei_conj(src.y())*invnm;
}
if (Derived::SizeAtCompileTime>3
@@ -85,7 +86,7 @@ struct ei_perpendicular_selector
};
template<typename Derived>
-struct ei_perpendicular_selector<Derived,2>
+struct ei_someOrthogonal_selector<Derived,2>
{
typedef typename ei_eval<Derived>::type VectorType;
inline static VectorType run(const Derived& src)
@@ -104,7 +105,7 @@ typename MatrixBase<Derived>::EvalType
MatrixBase<Derived>::someOrthogonal() const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
- return ei_perpendicular_selector<Derived>::run(derived());
+ return ei_someOrthogonal_selector<Derived>::run(derived());
}
#endif // EIGEN_ORTHOMETHODS_H