mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Compare commits
7 Commits
before-git
...
2.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7df9f92ff | ||
|
|
d2dcca52a3 | ||
|
|
7408e923a7 | ||
|
|
18ca438a62 | ||
|
|
d286300362 | ||
|
|
02ba4e2f54 | ||
|
|
2eef21a8d5 |
@@ -17,6 +17,9 @@
|
|||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
|
|
||||||
/** \defgroup Cholesky_Module Cholesky module
|
/** \defgroup Cholesky_Module Cholesky module
|
||||||
|
*
|
||||||
|
* \nonstableyet
|
||||||
|
*
|
||||||
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
|
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
|
||||||
* Those decompositions are accessible via the following MatrixBase methods:
|
* Those decompositions are accessible via the following MatrixBase methods:
|
||||||
* - MatrixBase::llt(),
|
* - MatrixBase::llt(),
|
||||||
|
|||||||
@@ -433,8 +433,13 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
|
|||||||
{
|
{
|
||||||
/* explicit vectorization */
|
/* explicit vectorization */
|
||||||
// process initial unaligned coeffs
|
// process initial unaligned coeffs
|
||||||
for (int j=0; j<alignedStart; ++j)
|
for (int j=0; j<alignedStart; ++j) {
|
||||||
res[j] += ei_pfirst(ptmp0)*lhs0[j] + ei_pfirst(ptmp1)*lhs1[j] + ei_pfirst(ptmp2)*lhs2[j] + ei_pfirst(ptmp3)*lhs3[j];
|
Scalar s = ei_pfirst(ptmp0)*lhs0[j];
|
||||||
|
s += ei_pfirst(ptmp1)*lhs1[j];
|
||||||
|
s += ei_pfirst(ptmp2)*lhs2[j];
|
||||||
|
s += ei_pfirst(ptmp3)*lhs3[j];
|
||||||
|
res[j] += s;
|
||||||
|
}
|
||||||
|
|
||||||
if (alignedSize>alignedStart)
|
if (alignedSize>alignedStart)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -508,15 +508,15 @@ class Matrix
|
|||||||
return ei_assign_selector<Matrix,OtherDerived,false>::run(*this, other.derived());
|
return ei_assign_selector<Matrix,OtherDerived,false>::run(*this, other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
static EIGEN_STRONG_INLINE void _check_template_params()
|
static EIGEN_STRONG_INLINE void _check_template_params()
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT((_Rows > 0
|
EIGEN_STATIC_ASSERT((_Rows > 0
|
||||||
&& _Cols > 0
|
&& _Cols > 0
|
||||||
&& _MaxRows <= _Rows
|
&& _MaxRows <= _Rows
|
||||||
&& _MaxCols <= _Cols
|
&& _MaxCols <= _Cols
|
||||||
&& (_Options & (AutoAlign|RowMajor)) == _Options),
|
&& (_Options & (AutoAlign|RowMajor)) == _Options),
|
||||||
INVALID_MATRIX_TEMPLATE_PARAMETERS)
|
INVALID_MATRIX_TEMPLATE_PARAMETERS)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \defgroup matrixtypedefs Global matrix typedefs
|
/** \defgroup matrixtypedefs Global matrix typedefs
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// for linear algebra. Eigen itself is part of the KDE project.
|
// for linear algebra. Eigen itself is part of the KDE project.
|
||||||
//
|
//
|
||||||
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
||||||
// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
|
// Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
|
||||||
//
|
//
|
||||||
// Eigen is free software; you can redistribute it and/or
|
// Eigen is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -41,7 +41,7 @@ template <typename T, int Size, int MatrixOptions,
|
|||||||
{
|
{
|
||||||
#ifndef EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
|
#ifndef EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
|
||||||
ei_assert((reinterpret_cast<size_t>(array) & 0xf) == 0
|
ei_assert((reinterpret_cast<size_t>(array) & 0xf) == 0
|
||||||
&& "this assertion is explained here: http://eigen.tuxfamily.org/api/UnalignedArrayAssert.html **** READ THIS WEB PAGE !!! ****");
|
&& "this assertion is explained here: http://eigen.tuxfamily.org/dox/UnalignedArrayAssert.html **** READ THIS WEB PAGE !!! ****");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,8 @@ struct ei_solve_triangular_selector<Lhs,Rhs,UpLo,ColMajor|IsDense>
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** "in-place" version of MatrixBase::solveTriangular() where the result is written in \a other
|
/** "in-place" version of MatrixBase::solveTriangular() where the result is written in \a other
|
||||||
|
*
|
||||||
|
* \nonstableyet
|
||||||
*
|
*
|
||||||
* The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.
|
* The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.
|
||||||
* This function will const_cast it, so constness isn't honored here.
|
* This function will const_cast it, so constness isn't honored here.
|
||||||
@@ -250,6 +252,8 @@ void MatrixBase<Derived>::solveTriangularInPlace(const MatrixBase<OtherDerived>&
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the product of the inverse of \c *this with \a other, \a *this being triangular.
|
/** \returns the product of the inverse of \c *this with \a other, \a *this being triangular.
|
||||||
|
*
|
||||||
|
* \nonstableyet
|
||||||
*
|
*
|
||||||
* This function computes the inverse-matrix matrix product inverse(\c *this) * \a other.
|
* This function computes the inverse-matrix matrix product inverse(\c *this) * \a other.
|
||||||
* The matrix \c *this must be triangular and invertible (i.e., all the coefficients of the
|
* The matrix \c *this must be triangular and invertible (i.e., all the coefficients of the
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// for linear algebra. Eigen itself is part of the KDE project.
|
// for linear algebra. Eigen itself is part of the KDE project.
|
||||||
//
|
//
|
||||||
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
||||||
// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
|
// Copyright (C) 2008-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
|
||||||
// Copyright (C) 2009 Kenneth Riddile <kfriddile@yahoo.com>
|
// Copyright (C) 2009 Kenneth Riddile <kfriddile@yahoo.com>
|
||||||
//
|
//
|
||||||
// Eigen is free software; you can redistribute it and/or
|
// Eigen is free software; you can redistribute it and/or
|
||||||
@@ -27,8 +27,7 @@
|
|||||||
#ifndef EIGEN_MEMORY_H
|
#ifndef EIGEN_MEMORY_H
|
||||||
#define EIGEN_MEMORY_H
|
#define EIGEN_MEMORY_H
|
||||||
|
|
||||||
// for NetBSD I didn't see any clear statement in the docs, but Mark Davies is confident about this.
|
#if defined(__APPLE__) || defined(_WIN64)
|
||||||
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(_WIN64)
|
|
||||||
#define EIGEN_MALLOC_ALREADY_ALIGNED 1
|
#define EIGEN_MALLOC_ALREADY_ALIGNED 1
|
||||||
#else
|
#else
|
||||||
#define EIGEN_MALLOC_ALREADY_ALIGNED 0
|
#define EIGEN_MALLOC_ALREADY_ALIGNED 0
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef EIGEN_ALIGNEDBOX_H
|
#ifndef EIGEN_ALIGNEDBOX_H
|
||||||
#define EIGEN_ALIGNEDBOX_H
|
#define EIGEN_ALIGNEDBOX_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
* \nonstableyet
|
* \nonstableyet
|
||||||
*
|
*
|
||||||
* \class AlignedBox
|
* \class AlignedBox
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef EIGEN_ANGLEAXIS_H
|
#ifndef EIGEN_ANGLEAXIS_H
|
||||||
#define EIGEN_ANGLEAXIS_H
|
#define EIGEN_ANGLEAXIS_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class AngleAxis
|
* \class AngleAxis
|
||||||
*
|
*
|
||||||
@@ -158,10 +158,10 @@ public:
|
|||||||
{ return m_axis.isApprox(other.m_axis, prec) && ei_isApprox(m_angle,other.m_angle, prec); }
|
{ return m_axis.isApprox(other.m_axis, prec) && ei_isApprox(m_angle,other.m_angle, prec); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup GeometryModule
|
/** \ingroup Geometry_Module
|
||||||
* single precision angle-axis type */
|
* single precision angle-axis type */
|
||||||
typedef AngleAxis<float> AngleAxisf;
|
typedef AngleAxis<float> AngleAxisf;
|
||||||
/** \ingroup GeometryModule
|
/** \ingroup Geometry_Module
|
||||||
* double precision angle-axis type */
|
* double precision angle-axis type */
|
||||||
typedef AngleAxis<double> AngleAxisd;
|
typedef AngleAxis<double> AngleAxisd;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef EIGEN_EULERANGLES_H
|
#ifndef EIGEN_EULERANGLES_H
|
||||||
#define EIGEN_EULERANGLES_H
|
#define EIGEN_EULERANGLES_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
* \nonstableyet
|
* \nonstableyet
|
||||||
*
|
*
|
||||||
* \returns the Euler-angles of the rotation matrix \c *this using the convention defined by the triplet (\a a0,\a a1,\a a2)
|
* \returns the Euler-angles of the rotation matrix \c *this using the convention defined by the triplet (\a a0,\a a1,\a a2)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#ifndef EIGEN_HYPERPLANE_H
|
#ifndef EIGEN_HYPERPLANE_H
|
||||||
#define EIGEN_HYPERPLANE_H
|
#define EIGEN_HYPERPLANE_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class Hyperplane
|
* \class Hyperplane
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#ifndef EIGEN_PARAMETRIZEDLINE_H
|
#ifndef EIGEN_PARAMETRIZEDLINE_H
|
||||||
#define EIGEN_PARAMETRIZEDLINE_H
|
#define EIGEN_PARAMETRIZEDLINE_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class ParametrizedLine
|
* \class ParametrizedLine
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ template<typename Other,
|
|||||||
int OtherCols=Other::ColsAtCompileTime>
|
int OtherCols=Other::ColsAtCompileTime>
|
||||||
struct ei_quaternion_assign_impl;
|
struct ei_quaternion_assign_impl;
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class Quaternion
|
* \class Quaternion
|
||||||
*
|
*
|
||||||
@@ -221,10 +221,10 @@ protected:
|
|||||||
Coefficients m_coeffs;
|
Coefficients m_coeffs;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup GeometryModule
|
/** \ingroup Geometry_Module
|
||||||
* single precision quaternion type */
|
* single precision quaternion type */
|
||||||
typedef Quaternion<float> Quaternionf;
|
typedef Quaternion<float> Quaternionf;
|
||||||
/** \ingroup GeometryModule
|
/** \ingroup Geometry_Module
|
||||||
* double precision quaternion type */
|
* double precision quaternion type */
|
||||||
typedef Quaternion<double> Quaterniond;
|
typedef Quaternion<double> Quaterniond;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef EIGEN_ROTATION2D_H
|
#ifndef EIGEN_ROTATION2D_H
|
||||||
#define EIGEN_ROTATION2D_H
|
#define EIGEN_ROTATION2D_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class Rotation2D
|
* \class Rotation2D
|
||||||
*
|
*
|
||||||
@@ -125,10 +125,10 @@ public:
|
|||||||
{ return ei_isApprox(m_angle,other.m_angle, prec); }
|
{ return ei_isApprox(m_angle,other.m_angle, prec); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup GeometryModule
|
/** \ingroup Geometry_Module
|
||||||
* single precision 2D rotation type */
|
* single precision 2D rotation type */
|
||||||
typedef Rotation2D<float> Rotation2Df;
|
typedef Rotation2D<float> Rotation2Df;
|
||||||
/** \ingroup GeometryModule
|
/** \ingroup Geometry_Module
|
||||||
* double precision 2D rotation type */
|
* double precision 2D rotation type */
|
||||||
typedef Rotation2D<double> Rotation2Dd;
|
typedef Rotation2D<double> Rotation2Dd;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef EIGEN_SCALING_H
|
#ifndef EIGEN_SCALING_H
|
||||||
#define EIGEN_SCALING_H
|
#define EIGEN_SCALING_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class Scaling
|
* \class Scaling
|
||||||
*
|
*
|
||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \addtogroup GeometryModule */
|
/** \addtogroup Geometry_Module */
|
||||||
//@{
|
//@{
|
||||||
typedef Scaling<float, 2> Scaling2f;
|
typedef Scaling<float, 2> Scaling2f;
|
||||||
typedef Scaling<double,2> Scaling2d;
|
typedef Scaling<double,2> Scaling2d;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ template< typename Other,
|
|||||||
int OtherCols=Other::ColsAtCompileTime>
|
int OtherCols=Other::ColsAtCompileTime>
|
||||||
struct ei_transform_product_impl;
|
struct ei_transform_product_impl;
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class Transform
|
* \class Transform
|
||||||
*
|
*
|
||||||
@@ -290,13 +290,13 @@ protected:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup GeometryModule */
|
/** \ingroup Geometry_Module */
|
||||||
typedef Transform<float,2> Transform2f;
|
typedef Transform<float,2> Transform2f;
|
||||||
/** \ingroup GeometryModule */
|
/** \ingroup Geometry_Module */
|
||||||
typedef Transform<float,3> Transform3f;
|
typedef Transform<float,3> Transform3f;
|
||||||
/** \ingroup GeometryModule */
|
/** \ingroup Geometry_Module */
|
||||||
typedef Transform<double,2> Transform2d;
|
typedef Transform<double,2> Transform2d;
|
||||||
/** \ingroup GeometryModule */
|
/** \ingroup Geometry_Module */
|
||||||
typedef Transform<double,3> Transform3d;
|
typedef Transform<double,3> Transform3d;
|
||||||
|
|
||||||
/**************************
|
/**************************
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef EIGEN_TRANSLATION_H
|
#ifndef EIGEN_TRANSLATION_H
|
||||||
#define EIGEN_TRANSLATION_H
|
#define EIGEN_TRANSLATION_H
|
||||||
|
|
||||||
/** \geometry_module \ingroup GeometryModule
|
/** \geometry_module \ingroup Geometry_Module
|
||||||
*
|
*
|
||||||
* \class Translation
|
* \class Translation
|
||||||
*
|
*
|
||||||
@@ -152,7 +152,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \addtogroup GeometryModule */
|
/** \addtogroup Geometry_Module */
|
||||||
//@{
|
//@{
|
||||||
typedef Translation<float, 2> Translation2f;
|
typedef Translation<float, 2> Translation2f;
|
||||||
typedef Translation<double,2> Translation2d;
|
typedef Translation<double,2> Translation2d;
|
||||||
|
|||||||
@@ -120,6 +120,6 @@ In order to generate the documentation of Eigen, please follow these steps:
|
|||||||
After doing that, you will 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.
|
||||||
|
|
||||||
<h2>Note however that the documentation is available online here:
|
<h2>Note however that the documentation is available online here:
|
||||||
<a href="http://eigen.tuxfamily.org/api/">http://eigen.tuxfamily.org/api</a></h2>
|
<a href="http://eigen.tuxfamily.org/dox/">http://eigen.tuxfamily.org/dox</a></h2>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ namespace Eigen {
|
|||||||
|
|
||||||
\section summary Summary
|
\section summary Summary
|
||||||
|
|
||||||
|
With the 2.0 release, Eigen's API is, to a large extent, stable. However, we wish to retain the freedom to make API incompatible changes. To that effect, we call many parts of Eigen "experimental" which means that they are not subject to API stability guarantee.
|
||||||
|
|
||||||
|
Our goal is that for the 2.1 release (expected in July 2009) most of these parts become API-stable too.
|
||||||
|
|
||||||
|
We are aware that API stability is a major concern for our users. That's why it's a priority for us to reach it, but at the same time we're being serious about not calling Eigen API-stable too early.
|
||||||
|
|
||||||
Experimental features may at any time:
|
Experimental features may at any time:
|
||||||
\li be removed;
|
\li be removed;
|
||||||
\li be subject to an API incompatible change;
|
\li be subject to an API incompatible change;
|
||||||
@@ -16,11 +22,12 @@ Experimental features may at any time:
|
|||||||
|
|
||||||
\section modules Experimental modules
|
\section modules Experimental modules
|
||||||
|
|
||||||
The following modules are considered entirely experimental:
|
The following modules are considered entirely experimental, and we make no firm API stability guarantee about them for the time being:
|
||||||
\li SVD
|
\li SVD
|
||||||
\li QR
|
\li QR
|
||||||
|
\li Cholesky
|
||||||
\li Sparse
|
\li Sparse
|
||||||
\li Geometry
|
\li Geometry (this one should be mostly stable, but it's a little too early to make a formal guarantee)
|
||||||
|
|
||||||
\section core Experimental parts of the Core module
|
\section core Experimental parts of the Core module
|
||||||
|
|
||||||
@@ -37,7 +44,7 @@ The only classes subject to (even partial) API stability guarantee (meaning that
|
|||||||
|
|
||||||
All other classes offer no direct API guarantee, e.g. their methods can be changed; however notice that most classes inherit MatrixBase and that this is where most of their API comes from -- so in practice most of the API is stable.
|
All other classes offer no direct API guarantee, e.g. their methods can be changed; however notice that most classes inherit MatrixBase and that this is where most of their API comes from -- so in practice most of the API is stable.
|
||||||
|
|
||||||
Here are the MatrixBase methods that are considered experimental, hence not part of any API stability guarantee:
|
A few MatrixBase methods are considered experimental, hence not part of any API stability guarantee:
|
||||||
\li all methods documented as internal
|
\li all methods documented as internal
|
||||||
\li all methods hidden in the Doxygen documentation
|
\li all methods hidden in the Doxygen documentation
|
||||||
\li all methods marked as experimental
|
\li all methods marked as experimental
|
||||||
|
|||||||
@@ -357,8 +357,8 @@ absolute value (\link Cwise::abs() abs \endlink, \link Cwise::abs2() abs2 \endli
|
|||||||
</td><td>\code
|
</td><td>\code
|
||||||
mat3 = mat1.cwise().min(mat2);
|
mat3 = mat1.cwise().min(mat2);
|
||||||
mat3 = mat1.cwise().max(mat2);
|
mat3 = mat1.cwise().max(mat2);
|
||||||
mat3 = mat1.cwise().abs(mat2);
|
mat3 = mat1.cwise().abs();
|
||||||
mat3 = mat1.cwise().abs2(mat2);
|
mat3 = mat1.cwise().abs2();
|
||||||
\endcode</td></tr>
|
\endcode</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ my_program: path/to/eigen2/Eigen/src/Core/MatrixStorage.h:44:
|
|||||||
Eigen::ei_matrix_array<T, Size, MatrixOptions, Align>::ei_matrix_array()
|
Eigen::ei_matrix_array<T, Size, MatrixOptions, Align>::ei_matrix_array()
|
||||||
[with T = double, int Size = 2, int MatrixOptions = 2, bool Align = true]:
|
[with T = double, int Size = 2, int MatrixOptions = 2, bool Align = true]:
|
||||||
Assertion `(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion
|
Assertion `(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion
|
||||||
is explained here: http://eigen.tuxfamily.org/api/UnalignedArrayAssert.html
|
is explained here: http://eigen.tuxfamily.org/dox/UnalignedArrayAssert.html
|
||||||
**** READ THIS WEB PAGE !!! ****"' failed.
|
**** READ THIS WEB PAGE !!! ****"' failed.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Matrix3d m = Matrix3i::Zero();
|
Matrix3d m = Matrix3d::Zero();
|
||||||
m.part<Eigen::StrictlyUpperTriangular>().setOnes();
|
m.part<Eigen::StrictlyUpperTriangular>().setOnes();
|
||||||
cout << "Here is the matrix m:" << endl << m << endl;
|
cout << "Here is the matrix m:" << endl << m << endl;
|
||||||
cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl
|
cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl
|
||||||
|
|||||||
@@ -103,7 +103,10 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
|||||||
m3 = m1;
|
m3 = m1;
|
||||||
m1.swap(m2);
|
m1.swap(m2);
|
||||||
VERIFY_IS_APPROX(m3, m2);
|
VERIFY_IS_APPROX(m3, m2);
|
||||||
VERIFY_IS_NOT_APPROX(m3, m1);
|
if(rows*cols>=3)
|
||||||
|
{
|
||||||
|
VERIFY_IS_NOT_APPROX(m3, m1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_basicstuff()
|
void test_basicstuff()
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ template<typename Scalar> void geometry(void)
|
|||||||
|
|
||||||
Scalar largeEps = test_precision<Scalar>();
|
Scalar largeEps = test_precision<Scalar>();
|
||||||
if (ei_is_same_type<Scalar,float>::ret)
|
if (ei_is_same_type<Scalar,float>::ret)
|
||||||
largeEps = 1e-3f;
|
largeEps = 1e-2f;
|
||||||
|
|
||||||
Vector3 v0 = Vector3::Random(),
|
Vector3 v0 = Vector3::Random(),
|
||||||
v1 = Vector3::Random(),
|
v1 = Vector3::Random(),
|
||||||
@@ -96,14 +96,18 @@ template<typename Scalar> void geometry(void)
|
|||||||
Scalar refangle = ei_abs(AngleAxisx(q1.inverse()*q2).angle());
|
Scalar refangle = ei_abs(AngleAxisx(q1.inverse()*q2).angle());
|
||||||
if (refangle>Scalar(M_PI))
|
if (refangle>Scalar(M_PI))
|
||||||
refangle = Scalar(2)*Scalar(M_PI) - refangle;
|
refangle = Scalar(2)*Scalar(M_PI) - refangle;
|
||||||
VERIFY(ei_isApprox(q1.angularDistance(q2), refangle, largeEps));
|
|
||||||
|
if((q1.coeffs()-q2.coeffs()).norm() > 10*largeEps)
|
||||||
|
{
|
||||||
|
VERIFY(ei_isApprox(q1.angularDistance(q2), refangle, largeEps));
|
||||||
|
}
|
||||||
|
|
||||||
// rotation matrix conversion
|
// rotation matrix conversion
|
||||||
VERIFY_IS_APPROX(q1 * v2, q1.toRotationMatrix() * v2);
|
VERIFY_IS_APPROX(q1 * v2, q1.toRotationMatrix() * v2);
|
||||||
VERIFY_IS_APPROX(q1 * q2 * v2,
|
VERIFY_IS_APPROX(q1 * q2 * v2,
|
||||||
q1.toRotationMatrix() * q2.toRotationMatrix() * v2);
|
q1.toRotationMatrix() * q2.toRotationMatrix() * v2);
|
||||||
|
|
||||||
VERIFY( (q2*q1).isApprox(q1*q2) || !(q2 * q1 * v2).isApprox(
|
VERIFY( (q2*q1).isApprox(q1*q2, largeEps) || !(q2 * q1 * v2).isApprox(
|
||||||
q1.toRotationMatrix() * q2.toRotationMatrix() * v2));
|
q1.toRotationMatrix() * q2.toRotationMatrix() * v2));
|
||||||
|
|
||||||
q2 = q1.toRotationMatrix();
|
q2 = q1.toRotationMatrix();
|
||||||
@@ -157,7 +161,7 @@ template<typename Scalar> void geometry(void)
|
|||||||
t1.prescale(v0);
|
t1.prescale(v0);
|
||||||
|
|
||||||
VERIFY_IS_APPROX( (t0 * Vector3(1,0,0)).norm(), v0.x());
|
VERIFY_IS_APPROX( (t0 * Vector3(1,0,0)).norm(), v0.x());
|
||||||
VERIFY(!ei_isApprox((t1 * Vector3(1,0,0)).norm(), v0.x()));
|
//VERIFY(!ei_isApprox((t1 * Vector3(1,0,0)).norm(), v0.x()));
|
||||||
|
|
||||||
t0.setIdentity();
|
t0.setIdentity();
|
||||||
t1.setIdentity();
|
t1.setIdentity();
|
||||||
|
|||||||
Reference in New Issue
Block a user