Hello community, here is the log from the commit of package libeigen2-devel for openSUSE:Factory checked in at Mon Jul 4 09:13:51 CEST 2011.
-------- --- KDE/libeigen2-devel/libeigen2-devel.changes 2011-03-15 16:41:37.000000000 +0100 +++ /mounts/work_src_done/STABLE/libeigen2-devel/libeigen2-devel.changes 2011-06-27 14:30:32.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Jun 27 14:30:20 UTC 2011 - [email protected] + +- update to 2.0.16 + * Fix bug in 3x3 tridiagonlisation (and consequently in 3x3 + selfadjoint eigen decomposition). + * Fix compilation for new gcc 4.6. + * Fix performance regression since 2.0.12: in some matrix-vector + product, complex matrix expressions were not pre-evaluated. + * Fix documentation of Least-Square. + * New feature: support for part<SelfAdjoint>. + * Fix bug in SparseLU::setOrderingMethod. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- eigen-2.0.15.tar.bz2 New: ---- eigen-2.0.16.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libeigen2-devel.spec ++++++ --- /var/tmp/diff_new_pack.QKmqys/_old 2011-07-04 09:12:55.000000000 +0200 +++ /var/tmp/diff_new_pack.QKmqys/_new 2011-07-04 09:12:55.000000000 +0200 @@ -22,11 +22,12 @@ BuildRequires: c++_compiler cmake doxygen kde4-filesystem pkg-config License: GPLv2+ ; LGPLv3+ Group: Development/Libraries/C and C++ -Summary: lightweight linear algebra C++ template library +Summary: Lightweight linear algebra C++ template library BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://eigen.tuxfamily.org/ -Version: 2.0.15 +Version: 2.0.16 Release: 1 +%define tar_ver 9ca09dbd70ce Source: eigen-%{version}.tar.bz2 %description @@ -34,7 +35,7 @@ a.k.a. linear algebra. %prep -%setup -q -n eigen-eigen-0938af7840b0 +%setup -q -n eigen-eigen-%{tar_ver} %build %cmake_kde4 -d build ++++++ eigen-2.0.15.tar.bz2 -> eigen-2.0.16.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/.hgtags new/eigen-eigen-9ca09dbd70ce/.hgtags --- old/eigen-eigen-0938af7840b0/.hgtags 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/.hgtags 2011-05-28 10:16:08.000000000 +0200 @@ -11,3 +11,4 @@ a1b04d0da20bcf28dd390980633e93499eecba24 2.0.12 99d564175944d85ab01324b066c9872e23bf32dd 2.0.13 f30db88dec8b1158e8329971e190adeaa0a37293 2.0.14 +0938af7840b013ea31f4bf31950fb87dc180144d 2.0.15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/CMakeLists.txt new/eigen-eigen-9ca09dbd70ce/CMakeLists.txt --- old/eigen-eigen-0938af7840b0/CMakeLists.txt 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/CMakeLists.txt 2011-05-28 10:16:08.000000000 +0200 @@ -7,7 +7,7 @@ "The directory where we install the header files" FORCE) -set(EIGEN_VERSION_NUMBER "2.0.15") +set(EIGEN_VERSION_NUMBER "2.0.16") set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER}") set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/Core new/eigen-eigen-9ca09dbd70ce/Eigen/Core --- old/eigen-eigen-0938af7840b0/Eigen/Core 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/Core 2011-05-28 10:16:08.000000000 +0200 @@ -52,6 +52,7 @@ #endif #endif +#include <cstddef> #include <cstdlib> #include <cmath> #include <complex> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/src/Core/Product.h new/eigen-eigen-9ca09dbd70ce/Eigen/src/Core/Product.h --- old/eigen-eigen-0938af7840b0/Eigen/src/Core/Product.h 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/src/Core/Product.h 2011-05-28 10:16:08.000000000 +0200 @@ -187,6 +187,17 @@ _LhsNested, _RhsNested, Scalar> ScalarCoeffImpl; public: + typedef typename ei_nested<_LhsNested,_RhsNested::ColsAtCompileTime>::type LhsNestedX; + typedef typename ei_nested<_RhsNested,_LhsNested::RowsAtCompileTime>::type RhsNestedX; + typedef typename ei_cleantype<LhsNestedX>::type _LhsNestedX; + typedef typename ei_cleantype<RhsNestedX>::type _RhsNestedX; + + + enum { + LhsNestedFlags = _LhsNestedX::Flags, + RhsNestedFlags = _RhsNestedX::Flags + }; + template<typename Lhs, typename Rhs> inline Product(const Lhs& lhs, const Rhs& rhs) @@ -522,11 +533,11 @@ template<typename ProductType, int LhsRows = ei_traits<ProductType>::RowsAtCompileTime, - int LhsOrder = int(ei_traits<ProductType>::LhsFlags)&RowMajorBit ? RowMajor : ColMajor, - int LhsHasDirectAccess = int(ei_traits<ProductType>::LhsFlags)&DirectAccessBit? HasDirectAccess : NoDirectAccess, - int RhsCols = ei_traits<ProductType>::ColsAtCompileTime, - int RhsOrder = int(ei_traits<ProductType>::RhsFlags)&RowMajorBit ? RowMajor : ColMajor, - int RhsHasDirectAccess = int(ei_traits<ProductType>::RhsFlags)&DirectAccessBit? HasDirectAccess : NoDirectAccess> + int LhsOrder = int(ProductType::LhsNestedFlags)&RowMajorBit ? RowMajor : ColMajor, + int LhsHasDirectAccess = int(ProductType::LhsNestedFlags)&DirectAccessBit? HasDirectAccess : NoDirectAccess, + int RhsCols = ProductType::ColsAtCompileTime, + int RhsOrder = int(ProductType::RhsNestedFlags)&RowMajorBit ? RowMajor : ColMajor, + int RhsHasDirectAccess = int(ProductType::RhsNestedFlags)&DirectAccessBit? HasDirectAccess : NoDirectAccess> struct ei_cache_friendly_product_selector { template<typename DestDerived> @@ -543,9 +554,12 @@ template<typename DestDerived> inline static void run(DestDerived& res, const ProductType& product) { - const int size = product.rhs().rows(); + typename ProductType::LhsNestedX lhs(product.lhs()); + typename ProductType::RhsNestedX rhs(product.rhs()); + + const int size = rhs.rows(); for (int k=0; k<size; ++k) - res += product.rhs().coeff(k) * product.lhs().col(k); + res += rhs.coeff(k) * lhs.col(k); } }; @@ -559,6 +573,9 @@ template<typename DestDerived> inline static void run(DestDerived& res, const ProductType& product) { + typename ProductType::LhsNestedX lhs(product.lhs()); + typename ProductType::RhsNestedX rhs(product.rhs()); + enum { EvalToRes = (ei_packet_traits<Scalar>::size==1) ||((DestDerived::Flags&ActualPacketAccessBit) && (!(DestDerived::Flags & RowMajorBit))) }; @@ -571,8 +588,8 @@ Map<Matrix<Scalar,DestDerived::RowsAtCompileTime,1,ColMajor> >(_res, res.size()) = res; } ei_cache_friendly_product_colmajor_times_vector(res.size(), - &product.lhs().const_cast_derived().coeffRef(0,0), product.lhs().stride(), - product.rhs(), _res); + &lhs.const_cast_derived().coeffRef(0,0), lhs.stride(), + rhs, _res); if (!EvalToRes) { @@ -589,9 +606,12 @@ template<typename DestDerived> inline static void run(DestDerived& res, const ProductType& product) { - const int cols = product.lhs().cols(); + typename ProductType::LhsNestedX lhs(product.lhs()); + typename ProductType::RhsNestedX rhs(product.rhs()); + + const int cols = lhs.cols(); for (int j=0; j<cols; ++j) - res += product.lhs().coeff(j) * product.rhs().row(j); + res += lhs.coeff(j) * rhs.row(j); } }; @@ -605,6 +625,9 @@ template<typename DestDerived> inline static void run(DestDerived& res, const ProductType& product) { + typename ProductType::LhsNestedX lhs(product.lhs()); + typename ProductType::RhsNestedX rhs(product.rhs()); + enum { EvalToRes = (ei_packet_traits<Scalar>::size==1) ||((DestDerived::Flags & ActualPacketAccessBit) && (DestDerived::Flags & RowMajorBit)) }; @@ -617,8 +640,8 @@ Map<Matrix<Scalar,1,DestDerived::SizeAtCompileTime,ColMajor> >(_res, res.size()) = res; } ei_cache_friendly_product_colmajor_times_vector(res.size(), - &product.rhs().const_cast_derived().coeffRef(0,0), product.rhs().stride(), - product.lhs().transpose(), _res); + &rhs.const_cast_derived().coeffRef(0,0), rhs.stride(), + lhs.transpose(), _res); if (!EvalToRes) { @@ -635,25 +658,28 @@ typedef typename ProductType::Scalar Scalar; typedef typename ei_traits<ProductType>::_RhsNested Rhs; enum { - UseRhsDirectly = ((ei_packet_traits<Scalar>::size==1) || (Rhs::Flags&ActualPacketAccessBit)) - && (Rhs::Flags&DirectAccessBit) - && (!(Rhs::Flags & RowMajorBit)) }; + UseRhsDirectly = ((ei_packet_traits<Scalar>::size==1) || (ProductType::RhsNestedFlags&ActualPacketAccessBit)) + && (ProductType::RhsNestedFlags&DirectAccessBit) + && (!(ProductType::RhsNestedFlags & RowMajorBit)) }; template<typename DestDerived> inline static void run(DestDerived& res, const ProductType& product) { + typename ProductType::LhsNestedX lhs(product.lhs()); + typename ProductType::RhsNestedX rhs(product.rhs()); + Scalar* EIGEN_RESTRICT _rhs; if (UseRhsDirectly) - _rhs = &product.rhs().const_cast_derived().coeffRef(0); + _rhs = &rhs.const_cast_derived().coeffRef(0); else { - _rhs = ei_aligned_stack_new(Scalar, product.rhs().size()); - Map<Matrix<Scalar,Rhs::SizeAtCompileTime,1,ColMajor> >(_rhs, product.rhs().size()) = product.rhs(); + _rhs = ei_aligned_stack_new(Scalar, rhs.size()); + Map<Matrix<Scalar,Rhs::SizeAtCompileTime,1,ColMajor> >(_rhs, rhs.size()) = rhs; } - ei_cache_friendly_product_rowmajor_times_vector(&product.lhs().const_cast_derived().coeffRef(0,0), product.lhs().stride(), - _rhs, product.rhs().size(), res); + ei_cache_friendly_product_rowmajor_times_vector(&lhs.const_cast_derived().coeffRef(0,0), lhs.stride(), + _rhs, rhs.size(), res); - if (!UseRhsDirectly) ei_aligned_stack_delete(Scalar, _rhs, product.rhs().size()); + if (!UseRhsDirectly) ei_aligned_stack_delete(Scalar, _rhs, rhs.size()); } }; @@ -664,25 +690,28 @@ typedef typename ProductType::Scalar Scalar; typedef typename ei_traits<ProductType>::_LhsNested Lhs; enum { - UseLhsDirectly = ((ei_packet_traits<Scalar>::size==1) || (Lhs::Flags&ActualPacketAccessBit)) - && (Lhs::Flags&DirectAccessBit) - && (Lhs::Flags & RowMajorBit) }; + UseLhsDirectly = ((ei_packet_traits<Scalar>::size==1) || (ProductType::LhsNestedFlags&ActualPacketAccessBit)) + && (ProductType::LhsNestedFlags&DirectAccessBit) + && (ProductType::LhsNestedFlags & RowMajorBit) }; template<typename DestDerived> inline static void run(DestDerived& res, const ProductType& product) { + typename ProductType::LhsNestedX lhs(product.lhs()); + typename ProductType::RhsNestedX rhs(product.rhs()); + Scalar* EIGEN_RESTRICT _lhs; if (UseLhsDirectly) - _lhs = &product.lhs().const_cast_derived().coeffRef(0); + _lhs = &lhs.const_cast_derived().coeffRef(0); else { - _lhs = ei_aligned_stack_new(Scalar, product.lhs().size()); - Map<Matrix<Scalar,1,Lhs::SizeAtCompileTime,ColMajor> >(_lhs, product.lhs().size()) = product.lhs(); + _lhs = ei_aligned_stack_new(Scalar, lhs.size()); + Map<Matrix<Scalar,1,Lhs::SizeAtCompileTime,ColMajor> >(_lhs, lhs.size()) = lhs; } - ei_cache_friendly_product_rowmajor_times_vector(&product.rhs().const_cast_derived().coeffRef(0,0), product.rhs().stride(), - _lhs, product.lhs().size(), res); + ei_cache_friendly_product_rowmajor_times_vector(&rhs.const_cast_derived().coeffRef(0,0), rhs.stride(), + _lhs, lhs.size(), res); - if(!UseLhsDirectly) ei_aligned_stack_delete(Scalar, _lhs, product.lhs().size()); + if(!UseLhsDirectly) ei_aligned_stack_delete(Scalar, _lhs, lhs.size()); } }; @@ -735,7 +764,7 @@ { typedef typename ei_cleantype<Lhs>::type _Lhs; typedef typename ei_cleantype<Rhs>::type _Rhs; - + typedef typename ei_nested<_Lhs,_Rhs::ColsAtCompileTime>::type LhsNested; typedef typename ei_nested<_Rhs,_Lhs::RowsAtCompileTime>::type RhsNested; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/src/Core/util/Macros.h new/eigen-eigen-9ca09dbd70ce/Eigen/src/Core/util/Macros.h --- old/eigen-eigen-0938af7840b0/Eigen/src/Core/util/Macros.h 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/src/Core/util/Macros.h 2011-05-28 10:16:08.000000000 +0200 @@ -30,7 +30,7 @@ #define EIGEN_WORLD_VERSION 2 #define EIGEN_MAJOR_VERSION 0 -#define EIGEN_MINOR_VERSION 15 +#define EIGEN_MINOR_VERSION 16 #define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \ (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/src/Core/util/XprHelper.h new/eigen-eigen-9ca09dbd70ce/Eigen/src/Core/util/XprHelper.h --- old/eigen-eigen-0938af7840b0/Eigen/src/Core/util/XprHelper.h 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/src/Core/util/XprHelper.h 2011-05-28 10:16:08.000000000 +0200 @@ -120,7 +120,7 @@ * in order to avoid a useless copy */ -template<typename T, int Sparseness = ei_traits<T>::Flags&SparseBit> class ei_eval; +template<typename T, int Sparseness = ei_traits<T>::Flags&SparseBit> struct ei_eval; template<typename T> struct ei_eval<T,IsDense> { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/src/LeastSquares/LeastSquares.h new/eigen-eigen-9ca09dbd70ce/Eigen/src/LeastSquares/LeastSquares.h --- old/eigen-eigen-0938af7840b0/Eigen/src/LeastSquares/LeastSquares.h 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/src/LeastSquares/LeastSquares.h 2011-05-28 10:16:08.000000000 +0200 @@ -54,10 +54,13 @@ * constants \f$a,b,c\f$ so that the plane of equation \f$y=ax+bz+c\f$ fits * best the five above points. To do that, call this function as follows: * @code + // create a vector of pointers to the points + std::vector<Vector3d> points_ptrs(5); + for(int k=0; k<5; ++k) points_ptrs[k] = &points[k]; Vector3d coeffs; // will store the coefficients a, b, c linearRegression( 5, - &points, + &(points_ptrs[0]), &coeffs, 1 // the coord to express as a function of // the other ones. 0 means x, 1 means y, 2 means z. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/src/QR/Tridiagonalization.h new/eigen-eigen-9ca09dbd70ce/Eigen/src/QR/Tridiagonalization.h --- old/eigen-eigen-0938af7840b0/Eigen/src/QR/Tridiagonalization.h 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/src/QR/Tridiagonalization.h 2011-05-28 10:16:08.000000000 +0200 @@ -391,7 +391,7 @@ { diag[0] = ei_real(mat(0,0)); RealScalar v1norm2 = ei_abs2(mat(0,2)); - if (ei_isMuchSmallerThan(v1norm2, RealScalar(1))) + if (v1norm2==RealScalar(0)) { diag[1] = ei_real(mat(1,1)); diag[2] = ei_real(mat(2,2)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/Eigen/src/Sparse/SparseLU.h new/eigen-eigen-9ca09dbd70ce/Eigen/src/Sparse/SparseLU.h --- old/eigen-eigen-0938af7840b0/Eigen/src/Sparse/SparseLU.h 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/Eigen/src/Sparse/SparseLU.h 2011-05-28 10:16:08.000000000 +0200 @@ -96,8 +96,8 @@ void setOrderingMethod(int m) { - ei_assert(m&~OrderingMask == 0 && m!=0 && "invalid ordering method"); - m_flags = m_flags&~OrderingMask | m&OrderingMask; + ei_assert((m&~OrderingMask) == 0 && m!=0 && "invalid ordering method"); + m_flags = (m_flags&~OrderingMask) | (m&OrderingMask); } int orderingMethod() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eigen-eigen-0938af7840b0/test/triangular.cpp new/eigen-eigen-9ca09dbd70ce/test/triangular.cpp --- old/eigen-eigen-0938af7840b0/test/triangular.cpp 2010-07-17 04:25:08.000000000 +0200 +++ new/eigen-eigen-9ca09dbd70ce/test/triangular.cpp 2011-05-28 10:16:08.000000000 +0200 @@ -121,11 +121,40 @@ m3.setZero(); m3.template part<Eigen::UpperTriangular>().setOnes(); VERIFY_IS_APPROX(m2,m3); +} +void selfadjoint() +{ + Matrix2i m; + m << 1, 2, + 3, 4; + VERIFY(m.part<SelfAdjoint>() == m); + + Matrix2i m1 = Matrix2i::Zero(); + m1.part<SelfAdjoint>() = m; + Matrix2i ref1; + ref1 << 1, 2, + 2, 4; + VERIFY(m1 == ref1); + + Matrix2i m2 = Matrix2i::Zero(); + m2.part<SelfAdjoint>() = m.part<UpperTriangular>(); + Matrix2i ref2; + ref2 << 1, 2, + 2, 4; + VERIFY(m2 == ref2); + + Matrix2i m3 = Matrix2i::Zero(); + m3.part<SelfAdjoint>() = m.part<LowerTriangular>(); + Matrix2i ref3; + ref3 << 1, 0, + 0, 4; + VERIFY(m3 == ref3); } void test_triangular() { + CALL_SUBTEST( selfadjoint() ); for(int i = 0; i < g_repeat ; i++) { CALL_SUBTEST( triangular(Matrix<float, 1, 1>()) ); CALL_SUBTEST( triangular(Matrix<float, 2, 2>()) ); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
