git.haldean.org subd / 264e9ff
Update to working version of Eigen Will Brown 9 years ago
1201 changed file(s) with 193325 addition(s) and 98 deletion(s). Raw diff Collapse all Expand all
135135 #endif
136136
137137 // MSVC for windows mobile does not have the errno.h file
138 #if !(defined(_MSC_VER) && defined(_WIN32_WCE))
138 #if !(defined(_MSC_VER) && defined(_WIN32_WCE)) && !defined(__ARMCC_VERSION)
139139 #define EIGEN_HAS_ERRNO
140140 #endif
141141
1212 *
1313 *
1414 *
15 * This module provides SVD decomposition for (currently) real matrices.
15 * This module provides SVD decomposition for matrices (both real and complex).
1616 * This decomposition is accessible via the following MatrixBase method:
17 * - MatrixBase::svd()
17 * - MatrixBase::jacobiSvd()
1818 *
1919 * \code
2020 * #include <Eigen/SVD>
330330
331331 template<typename MatrixType> struct LDLT_Traits<MatrixType,Lower>
332332 {
333 typedef TriangularView<MatrixType, UnitLower> MatrixL;
334 typedef TriangularView<typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
333 typedef const TriangularView<const MatrixType, UnitLower> MatrixL;
334 typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
335335 inline static MatrixL getL(const MatrixType& m) { return m; }
336336 inline static MatrixU getU(const MatrixType& m) { return m.adjoint(); }
337337 };
338338
339339 template<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>
340340 {
341 typedef TriangularView<typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
342 typedef TriangularView<MatrixType, UnitUpper> MatrixU;
341 typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
342 typedef const TriangularView<const MatrixType, UnitUpper> MatrixU;
343343 inline static MatrixL getL(const MatrixType& m) { return m.adjoint(); }
344344 inline static MatrixU getU(const MatrixType& m) { return m; }
345345 };
273273
274274 template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
275275 {
276 typedef TriangularView<MatrixType, Lower> MatrixL;
277 typedef TriangularView<typename MatrixType::AdjointReturnType, Upper> MatrixU;
276 typedef const TriangularView<const MatrixType, Lower> MatrixL;
277 typedef const TriangularView<const typename MatrixType::AdjointReturnType, Upper> MatrixU;
278278 inline static MatrixL getL(const MatrixType& m) { return m; }
279279 inline static MatrixU getU(const MatrixType& m) { return m.adjoint(); }
280280 static bool inplace_decomposition(MatrixType& m)
283283
284284 template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
285285 {
286 typedef TriangularView<typename MatrixType::AdjointReturnType, Lower> MatrixL;
287 typedef TriangularView<MatrixType, Upper> MatrixU;
286 typedef const TriangularView<const typename MatrixType::AdjointReturnType, Lower> MatrixL;
287 typedef const TriangularView<const MatrixType, Upper> MatrixU;
288288 inline static MatrixL getL(const MatrixType& m) { return m.adjoint(); }
289289 inline static MatrixU getU(const MatrixType& m) { return m; }
290290 static bool inplace_decomposition(MatrixType& m)
9393 MaskPacketAccessBit = (InnerSize == Dynamic || (InnerSize % packet_traits<Scalar>::size) == 0)
9494 && (InnerStrideAtCompileTime == 1)
9595 ? PacketAccessBit : 0,
96 MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * sizeof(Scalar)) % 16) == 0)) ? AlignedBit : 0,
96 MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % 16) == 0)) ? AlignedBit : 0,
9797 FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ? LinearAccessBit : 0,
9898 FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,
9999 FlagsRowMajorBit = IsRowMajor ? RowMajorBit : 0,
341341 }
342342
343343 const typename XprType::Nested m_xpr;
344 int m_outerStride;
344 Index m_outerStride;
345345 };
346346
347347
168168
169169 IsRowMajor = int(Flags) & RowMajorBit, /**< True if this expression has row-major storage order. */
170170
171 InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? SizeAtCompileTime
172 : int(IsRowMajor) ? ColsAtCompileTime : RowsAtCompileTime,
171 InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)
172 : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
173173
174174 CoeffReadCost = internal::traits<Derived>::CoeffReadCost,
175175 /**< This is a rough measure of how expensive it is to read one coefficient from
248248 template<typename Scalar> struct scalar_abs_op {
249249 EIGEN_EMPTY_STRUCT_CTOR(scalar_abs_op)
250250 typedef typename NumTraits<Scalar>::Real result_type;
251 EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return abs(a); }
251 EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return internal::abs(a); }
252252 template<typename Packet>
253253 EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
254254 { return internal::pabs(a); }
270270 template<typename Scalar> struct scalar_abs2_op {
271271 EIGEN_EMPTY_STRUCT_CTOR(scalar_abs2_op)
272272 typedef typename NumTraits<Scalar>::Real result_type;
273 EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return abs2(a); }
273 EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return internal::abs2(a); }
274274 template<typename Packet>
275275 EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
276276 { return internal::pmul(a,a); }
286286 */
287287 template<typename Scalar> struct scalar_conjugate_op {
288288 EIGEN_EMPTY_STRUCT_CTOR(scalar_conjugate_op)
289 EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return conj(a); }
289 EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return internal::conj(a); }
290290 template<typename Packet>
291291 EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const { return internal::pconj(a); }
292292 };
323323 struct scalar_real_op {
324324 EIGEN_EMPTY_STRUCT_CTOR(scalar_real_op)
325325 typedef typename NumTraits<Scalar>::Real result_type;
326 EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return real(a); }
326 EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return internal::real(a); }
327327 };
328328 template<typename Scalar>
329329 struct functor_traits<scalar_real_op<Scalar> >
338338 struct scalar_imag_op {
339339 EIGEN_EMPTY_STRUCT_CTOR(scalar_imag_op)
340340 typedef typename NumTraits<Scalar>::Real result_type;
341 EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return imag(a); }
341 EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return internal::imag(a); }
342342 };
343343 template<typename Scalar>
344344 struct functor_traits<scalar_imag_op<Scalar> >
353353 struct scalar_real_ref_op {
354354 EIGEN_EMPTY_STRUCT_CTOR(scalar_real_ref_op)
355355 typedef typename NumTraits<Scalar>::Real result_type;
356 EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return real_ref(*const_cast<Scalar*>(&a)); }
356 EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return internal::real_ref(*const_cast<Scalar*>(&a)); }
357357 };
358358 template<typename Scalar>
359359 struct functor_traits<scalar_real_ref_op<Scalar> >
368368 struct scalar_imag_ref_op {
369369 EIGEN_EMPTY_STRUCT_CTOR(scalar_imag_ref_op)
370370 typedef typename NumTraits<Scalar>::Real result_type;
371 EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return imag_ref(*const_cast<Scalar*>(&a)); }
371 EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return internal::imag_ref(*const_cast<Scalar*>(&a)); }
372372 };
373373 template<typename Scalar>
374374 struct functor_traits<scalar_imag_ref_op<Scalar> >
382382 */
383383 template<typename Scalar> struct scalar_exp_op {
384384 EIGEN_EMPTY_STRUCT_CTOR(scalar_exp_op)
385 inline const Scalar operator() (const Scalar& a) const { return exp(a); }
385 inline const Scalar operator() (const Scalar& a) const { return internal::exp(a); }
386386 typedef typename packet_traits<Scalar>::type Packet;
387387 inline Packet packetOp(const Packet& a) const { return internal::pexp(a); }
388388 };
398398 */
399399 template<typename Scalar> struct scalar_log_op {
400400 EIGEN_EMPTY_STRUCT_CTOR(scalar_log_op)
401 inline const Scalar operator() (const Scalar& a) const { return log(a); }
401 inline const Scalar operator() (const Scalar& a) const { return internal::log(a); }
402402 typedef typename packet_traits<Scalar>::type Packet;
403403 inline Packet packetOp(const Packet& a) const { return internal::plog(a); }
404404 };
656656 */
657657 template<typename Scalar> struct scalar_sqrt_op {
658658 EIGEN_EMPTY_STRUCT_CTOR(scalar_sqrt_op)
659 inline const Scalar operator() (const Scalar& a) const { return sqrt(a); }
659 inline const Scalar operator() (const Scalar& a) const { return internal::sqrt(a); }
660660 typedef typename packet_traits<Scalar>::type Packet;
661661 inline Packet packetOp(const Packet& a) const { return internal::psqrt(a); }
662662 };
674674 */
675675 template<typename Scalar> struct scalar_cos_op {
676676 EIGEN_EMPTY_STRUCT_CTOR(scalar_cos_op)
677 inline Scalar operator() (const Scalar& a) const { return cos(a); }
677 inline Scalar operator() (const Scalar& a) const { return internal::cos(a); }
678678 typedef typename packet_traits<Scalar>::type Packet;
679679 inline Packet packetOp(const Packet& a) const { return internal::pcos(a); }
680680 };
693693 */
694694 template<typename Scalar> struct scalar_sin_op {
695695 EIGEN_EMPTY_STRUCT_CTOR(scalar_sin_op)
696 inline const Scalar operator() (const Scalar& a) const { return sin(a); }
696 inline const Scalar operator() (const Scalar& a) const { return internal::sin(a); }
697697 typedef typename packet_traits<Scalar>::type Packet;
698698 inline Packet packetOp(const Packet& a) const { return internal::psin(a); }
699699 };
713713 */
714714 template<typename Scalar> struct scalar_tan_op {
715715 EIGEN_EMPTY_STRUCT_CTOR(scalar_tan_op)
716 inline const Scalar operator() (const Scalar& a) const { return tan(a); }
716 inline const Scalar operator() (const Scalar& a) const { return internal::tan(a); }
717717 typedef typename packet_traits<Scalar>::type Packet;
718718 inline Packet packetOp(const Packet& a) const { return internal::ptan(a); }
719719 };
732732 */
733733 template<typename Scalar> struct scalar_acos_op {
734734 EIGEN_EMPTY_STRUCT_CTOR(scalar_acos_op)
735 inline const Scalar operator() (const Scalar& a) const { return acos(a); }
735 inline const Scalar operator() (const Scalar& a) const { return internal::acos(a); }
736736 typedef typename packet_traits<Scalar>::type Packet;
737737 inline Packet packetOp(const Packet& a) const { return internal::pacos(a); }
738738 };
751751 */
752752 template<typename Scalar> struct scalar_asin_op {
753753 EIGEN_EMPTY_STRUCT_CTOR(scalar_asin_op)
754 inline const Scalar operator() (const Scalar& a) const { return asin(a); }
754 inline const Scalar operator() (const Scalar& a) const { return internal::asin(a); }
755755 typedef typename packet_traits<Scalar>::type Packet;
756756 inline Packet packetOp(const Packet& a) const { return internal::pasin(a); }
757757 };
101101 || HasNoOuterStride
102102 || ( OuterStrideAtCompileTime!=Dynamic
103103 && ((static_cast<int>(sizeof(Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
104 Flags0 = TraitsBase::Flags,
104 Flags0 = TraitsBase::Flags & (~NestByRefBit),
105105 Flags1 = IsAligned ? (int(Flags0) | AlignedBit) : (int(Flags0) & ~AlignedBit),
106106 Flags2 = (bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime))
107107 ? int(Flags1) : int(Flags1 & ~LinearAccessBit),
119119 public:
120120
121121 typedef MapBase<Map> Base;
122
123122 EIGEN_DENSE_PUBLIC_INTERFACE(Map)
124123
125124 typedef typename Base::PointerType PointerType;
180179 PlainObjectType::Base::_check_template_params();
181180 }
182181
183
184182 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
185183
186184 protected:
4646 throw_std_bad_alloc();
4747 }
4848
49 template <typename Derived, typename OtherDerived = Derived, bool IsVector = static_cast<bool>(Derived::IsVectorAtCompileTime)> struct conservative_resize_like_impl;
49 template <typename Derived, typename OtherDerived = Derived, bool IsVector = bool(Derived::IsVectorAtCompileTime)> struct conservative_resize_like_impl;
5050
5151 template<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers> struct matrix_swap_impl;
5252
151151 #else
152152 EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
153153 eigen_assert(this->rows() == 1 && this->cols() == 1);
154 return derived().coeff(row,col);
154 Matrix<Scalar,1,1> result = *this;
155 return result.coeff(row,col);
155156 #endif
156157 }
157158
159160 {
160161 EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
161162 eigen_assert(this->rows() == 1 && this->cols() == 1);
162 return derived().coeff(i);
163 Matrix<Scalar,1,1> result = *this;
164 return result.coeff(i);
163165 }
164166
165167 const Scalar& coeffRef(Index row, Index col) const
4747 typedef typename MatrixType::Scalar Scalar;
4848 typedef typename traits<MatrixType>::StorageKind StorageKind;
4949 typedef typename traits<MatrixType>::XprKind XprKind;
50 typedef typename nested<MatrixType>::type MatrixTypeNested;
50 enum {
51 Factor = (RowFactor==Dynamic || ColFactor==Dynamic) ? Dynamic : RowFactor*ColFactor
52 };
53 typedef typename nested<MatrixType,Factor>::type MatrixTypeNested;
5154 typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
5255 enum {
5356 RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
7174 template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
7275 : public internal::dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type
7376 {
77 typedef typename internal::traits<Replicate>::MatrixTypeNested MatrixTypeNested;
78 typedef typename internal::traits<Replicate>::_MatrixTypeNested _MatrixTypeNested;
7479 public:
7580
7681 typedef typename internal::dense_xpr_base<Replicate>::type Base;
123128
124129
125130 protected:
126 const typename MatrixType::Nested m_matrix;
131 const MatrixTypeNested m_matrix;
127132 const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor;
128133 const internal::variable_if_dynamic<Index, ColFactor> m_colFactor;
129134 };
120120 _EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f);
121121
122122
123 _EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647949f);
123 _EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647950f);
124124 _EIGEN_DECLARE_CONST_Packet4f(exp_lo, -88.3762626647949f);
125125
126126 _EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f);
167167 y = pmadd(y, z, x);
168168 y = padd(y, p4f_1);
169169
170 /* build 2^n */
170 // build 2^n
171171 emm0 = _mm_cvttps_epi32(fx);
172172 emm0 = _mm_add_epi32(emm0, p4i_0x7f);
173173 emm0 = _mm_slli_epi32(emm0, 23);
2929 template<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs=false, bool _ConjRhs=false>
3030 class gebp_traits;
3131
32 /** \internal \returns b if a<=0, and returns a otherwise. */
33 inline std::ptrdiff_t manage_caching_sizes_helper(std::ptrdiff_t a, std::ptrdiff_t b)
34 {
35 return a<=0 ? b : a;
36 }
37
3238 /** \internal */
3339 inline void manage_caching_sizes(Action action, std::ptrdiff_t* l1=0, std::ptrdiff_t* l2=0)
3440 {
3541 static std::ptrdiff_t m_l1CacheSize = 0;
3642 static std::ptrdiff_t m_l2CacheSize = 0;
43 #ifdef _OPENMP
44 #pragma omp threadprivate(m_l1CacheSize,m_l2CacheSize)
45 #endif
3746 if(m_l1CacheSize==0)
3847 {
39 m_l1CacheSize = queryL1CacheSize();
40 m_l2CacheSize = queryTopLevelCacheSize();
41
42 if(m_l1CacheSize<=0) m_l1CacheSize = 8 * 1024;
43 if(m_l2CacheSize<=0) m_l2CacheSize = 1 * 1024 * 1024;
48 m_l1CacheSize = manage_caching_sizes_helper(queryL1CacheSize(),8 * 1024);
49 m_l2CacheSize = manage_caching_sizes_helper(queryTopLevelCacheSize(),1*1024*1024);
4450 }
4551
4652 if(action==SetAction)
0
01 // This file is part of Eigen, a lightweight C++ template library
12 // for linear algebra.
23 //
2728
2829 #define EIGEN_WORLD_VERSION 3
2930 #define EIGEN_MAJOR_VERSION 0
30 #define EIGEN_MINOR_VERSION 4
31 #define EIGEN_MINOR_VERSION 6
3132
3233 #define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
3334 (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
263264 * If we made alignment depend on whether or not EIGEN_VECTORIZE is defined, it would be impossible to link
264265 * vectorized and non-vectorized code.
265266 */
266 #if (defined __GNUC__) || (defined __PGI) || (defined __IBMCPP__)
267 #if (defined __GNUC__) || (defined __PGI) || (defined __IBMCPP__) || (defined __ARMCC_VERSION)
267268 #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
268269 #elif (defined _MSC_VER)
269270 #define EIGEN_ALIGN_TO_BOUNDARY(n) __declspec(align(n))
126126 ((Options&DontAlign)==0)
127127 && (
128128 #if EIGEN_ALIGN_STATICALLY
129 ((!is_dynamic_size_storage) && (((MaxCols*MaxRows*sizeof(Scalar)) % 16) == 0))
129 ((!is_dynamic_size_storage) && (((MaxCols*MaxRows*int(sizeof(Scalar))) % 16) == 0))
130130 #else
131131 0
132132 #endif
290290
291291 ComputationInfo info() const
292292 {
293 eigen_assert(m_isInitialized && "ComplexEigenSolver is not initialized.");
293 eigen_assert(m_isInitialized && "EigenSolver is not initialized.");
294294 return m_realSchur.info();
295295 }
296296
338338 EigenvectorsType matV(n,n);
339339 for (Index j=0; j<n; ++j)
340340 {
341 if (internal::isMuchSmallerThan(internal::imag(m_eivalues.coeff(j)), internal::real(m_eivalues.coeff(j))))
341 if (internal::isMuchSmallerThan(internal::imag(m_eivalues.coeff(j)), internal::real(m_eivalues.coeff(j))) || j+1==n)
342342 {
343343 // we have a real eigen value
344344 matV.col(j) = m_eivec.col(j).template cast<ComplexScalar>();
569569
570570 }
571571 }
572
573 // We handled a pair of complex conjugate eigenvalues, so need to skip them both
574 n--;
572575 }
573576 else
574577 {
575 eigen_assert("Internal bug in EigenSolver"); // this should not happen
578 eigen_assert(0 && "Internal bug in EigenSolver"); // this should not happen
576579 }
577580 }
578581
237237 Scalar exshift = 0.0; // sum of exceptional shifts
238238 Scalar norm = computeNormOfT();
239239
240 while (iu >= 0)
241 {
242 Index il = findSmallSubdiagEntry(iu, norm);
243
244 // Check for convergence
245 if (il == iu) // One root found
246 {
247 m_matT.coeffRef(iu,iu) = m_matT.coeff(iu,iu) + exshift;
248 if (iu > 0)
249 m_matT.coeffRef(iu, iu-1) = Scalar(0);
250 iu--;
251 iter = 0;
252 }
253 else if (il == iu-1) // Two roots found
254 {
255 splitOffTwoRows(iu, computeU, exshift);
256 iu -= 2;
257 iter = 0;
258 }
259 else // No convergence yet
260 {
261 // The firstHouseholderVector vector has to be initialized to something to get rid of a silly GCC warning (-O1 -Wall -DNDEBUG )
262 Vector3s firstHouseholderVector(0,0,0), shiftInfo;
263 computeShift(iu, iter, exshift, shiftInfo);
264 iter = iter + 1;
265 if (iter > m_maxIterations) break;
266 Index im;
267 initFrancisQRStep(il, iu, shiftInfo, im, firstHouseholderVector);
268 performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);
269 }
270 }
271
240 if(norm!=0)
241 {
242 while (iu >= 0)
243 {
244 Index il = findSmallSubdiagEntry(iu, norm);
245
246 // Check for convergence
247 if (il == iu) // One root found
248 {
249 m_matT.coeffRef(iu,iu) = m_matT.coeff(iu,iu) + exshift;
250 if (iu > 0)
251 m_matT.coeffRef(iu, iu-1) = Scalar(0);
252 iu--;
253 iter = 0;
254 }
255 else if (il == iu-1) // Two roots found
256 {
257 splitOffTwoRows(iu, computeU, exshift);
258 iu -= 2;
259 iter = 0;
260 }
261 else // No convergence yet
262 {
263 // The firstHouseholderVector vector has to be initialized to something to get rid of a silly GCC warning (-O1 -Wall -DNDEBUG )
264 Vector3s firstHouseholderVector(0,0,0), shiftInfo;
265 computeShift(iu, iter, exshift, shiftInfo);
266 iter = iter + 1;
267 if (iter > m_maxIterations) break;
268 Index im;
269 initFrancisQRStep(il, iu, shiftInfo, im, firstHouseholderVector);
270 performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);
271 }
272 }
273 }
274
272275 if(iter <= m_maxIterations)
273276 m_info = Success;
274277 else
219219 const MatrixType& eigenvectors() const
220220 {
221221 eigen_assert(m_isInitialized && "SelfAdjointEigenSolver is not initialized.");
222 eigen_assert(info() == Success && "Eigenvalue computation did not converge.");
223222 eigen_assert(m_eigenvectorsOk && "The eigenvectors have not been computed together with the eigenvalues.");
224223 return m_eivec;
225224 }
242241 const RealVectorType& eigenvalues() const
243242 {
244243 eigen_assert(m_isInitialized && "SelfAdjointEigenSolver is not initialized.");
245 eigen_assert(info() == Success && "Eigenvalue computation did not converge.");
246244 return m_eivalues;
247245 }
248246
267265 MatrixType operatorSqrt() const
268266 {
269267 eigen_assert(m_isInitialized && "SelfAdjointEigenSolver is not initialized.");
270 eigen_assert(info() == Success && "Eigenvalue computation did not converge.");
271268 eigen_assert(m_eigenvectorsOk && "The eigenvectors have not been computed together with the eigenvalues.");
272269 return m_eivec * m_eivalues.cwiseSqrt().asDiagonal() * m_eivec.adjoint();
273270 }
293290 MatrixType operatorInverseSqrt() const
294291 {
295292 eigen_assert(m_isInitialized && "SelfAdjointEigenSolver is not initialized.");
296 eigen_assert(info() == Success && "Eigenvalue computation did not converge.");
297293 eigen_assert(m_eigenvectorsOk && "The eigenvectors have not been computed together with the eigenvalues.");
298294 return m_eivec * m_eivalues.cwiseInverse().cwiseSqrt().asDiagonal() * m_eivec.adjoint();
299295 }
224224 normal() = mat * normal();
225225 else
226226 {
227 eigen_assert("invalid traits value in Hyperplane::transform()");
227 eigen_assert(0 && "invalid traits value in Hyperplane::transform()");
228228 }
229229 return *this;
230230 }
681681 Scalar scale0;
682682 Scalar scale1;
683683
684 if (absD>=one)
684 if(absD>=one)
685685 {
686686 scale0 = Scalar(1) - t;
687687 scale1 = t;
694694
695695 scale0 = internal::sin( ( Scalar(1) - t ) * theta) / sinTheta;
696696 scale1 = internal::sin( ( t * theta) ) / sinTheta;
697 if (d<0)
698 scale1 = -scale1;
699697 }
698 if(d<0) scale1 = -scale1;
700699
701700 return Quaternion<Scalar>(scale0 * coeffs() + scale1 * other.coeffs());
702701 }
8888
8989 /** Concatenates two rotations */
9090 inline Rotation2D& operator*=(const Rotation2D& other)
91 { return m_angle += other.m_angle; return *this; }
91 { m_angle += other.m_angle; return *this; }
9292
9393 /** Applies the rotation to a 2D vector */
9494 Vector2 operator* (const Vector2& vec) const
3636 Dim = Transform::Dim,
3737 HDim = Transform::HDim,
3838 Mode = Transform::Mode,
39 IsProjective = (Mode==Projective)
39 IsProjective = (int(Mode)==int(Projective))
4040 };
4141 };
4242
6060 typename Rhs,
6161 bool AnyProjective =
6262 transform_traits<Lhs>::IsProjective ||
63 transform_traits<Lhs>::IsProjective>
63 transform_traits<Rhs>::IsProjective>
6464 struct transform_transform_product_impl;
6565
6666 template< typename Other,
570570 if(int(Mode)!=int(AffineCompact))
571571 {
572572 matrix().template block<1,Dim>(Dim,0).setZero();
573 matrix().coeffRef(Dim,Dim) = 1;
573 matrix().coeffRef(Dim,Dim) = Scalar(1);
574574 }
575575 }
576576
13901390 }
13911391 };
13921392
1393 template<typename Scalar, int Dim, int LhsOptions, int RhsOptions>
1394 struct transform_transform_product_impl<Transform<Scalar,Dim,AffineCompact,LhsOptions>,Transform<Scalar,Dim,Projective,RhsOptions>,true >
1395 {
1396 typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
1397 typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
1398 typedef Transform<Scalar,Dim,Projective> ResultType;
1399 static ResultType run(const Lhs& lhs, const Rhs& rhs)
1400 {
1401 ResultType res;
1402 res.matrix().template topRows<Dim>() = lhs.matrix() * rhs.matrix();
1403 res.matrix().row(Dim) = rhs.matrix().row(Dim);
1404 return res;
1405 }
1406 };
1407
1408 template<typename Scalar, int Dim, int LhsOptions, int RhsOptions>
1409 struct transform_transform_product_impl<Transform<Scalar,Dim,Projective,LhsOptions>,Transform<Scalar,Dim,AffineCompact,RhsOptions>,true >
1410 {
1411 typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
1412 typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
1413 typedef Transform<Scalar,Dim,Projective> ResultType;
1414 static ResultType run(const Lhs& lhs, const Rhs& rhs)
1415 {
1416 ResultType res(lhs.matrix().template leftCols<Dim>() * rhs.matrix());
1417 res.matrix().col(Dim) += lhs.matrix().col(Dim);
1418 return res;
1419 }
1420 };
1421
13931422 } // end namespace internal
13941423
13951424 #endif // EIGEN_TRANSFORM_H
9595 */
9696 t1 = padd(pmul(a_ww, b_xy), pmul(a_yy, b_zw));
9797 t2 = psub(pmul(a_zz, b_xy), pmul(a_xx, b_zw));
98 #ifdef __SSE3__
98 #ifdef EIGEN_VECTORIZE_SSE3
9999 EIGEN_UNUSED_VARIABLE(mask)
100100 pstore(&res.x(), _mm_addsub_pd(t1, preverse(t2)));
101101 #else
109109 */
110110 t1 = psub(pmul(a_ww, b_zw), pmul(a_yy, b_xy));
111111 t2 = padd(pmul(a_zz, b_zw), pmul(a_xx, b_xy));
112 #ifdef __SSE3__
112 #ifdef EIGEN_VECTORIZE_SSE3
113113 EIGEN_UNUSED_VARIABLE(mask)
114114 pstore(&res.z(), preverse(_mm_addsub_pd(preverse(t1), t2)));
115115 #else
5454
5555 static void run(const MatrixType& matrix, ResultType& result)
5656 {
57 EIGEN_ALIGN16 const int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
57 EIGEN_ALIGN16 const unsigned int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
5858
5959 // Load the full matrix into registers
6060 __m128 _L1 = matrix.template packet<MatrixAlignment>( 0);
707707 };
708708 } // end namespace internal
709709
710 /** \svd_module
711 *
712 * \return the singular value decomposition of \c *this computed by two-sided
713 * Jacobi transformations.
714 *
715 * \sa class JacobiSVD
716 */
710717 template<typename Derived>
711718 JacobiSVD<typename MatrixBase<Derived>::PlainObject>
712719 MatrixBase<Derived>::jacobiSvd(unsigned int computationOptions) const
0 repo: 8a21fd850624c931e448cbcfb38168cb2717c790
1 node: c76e08cca8ebb060d875f2c189c5f3c4c46929f1
2 branch: 3.0
3 tag: 3.0.6
0 [patterns]
1 **.* = native
2 eigen_autoexp_part.dat = CRLF
0 syntax: glob
1 qrc_*cxx
2 *.orig
3 *.pyc
4 *.diff
5 diff
6 *.save
7 save
8 *.old
9 *.gmo
10 *.qm
11 core
12 core.*
13 *.bak
14 *~
15 build*
16 *.moc.*
17 *.moc
18 ui_*
19 CMakeCache.txt
20 tags
21 .*.swp
22 activity.png
23 *.out
24 *.php*
25 *.log
26 *.orig
27 *.rej
28 log
29 patch
30 a
31 a.*
0 2db9468678c6480c9633b6272ff0e3599d1e11a3 2.0-beta3
1 375224817dce669b6fa31d920d4c895a63fabf32 2.0-beta1
2 3b8120f077865e2a072e10f5be33e1d942b83a06 2.0-rc1
3 19dfc0e7666bcee26f7a49eb42f39a0280a3485e 2.0-beta5
4 7a7d8a9526f003ffa2430dfb0c2c535b5add3023 2.0-beta4
5 7d14ad088ac23769c349518762704f0257f6a39b 2.0.1
6 b9d48561579fd7d4c05b2aa42235dc9de6484bf2 2.0-beta6
7 e17630a40408243cb1a51ad0fe3a99beb75b7450 before-hg-migration
8 eda654d4cda2210ce80719addcf854773e6dec5a 2.0.0
9 ee9a7c468a9e73fab12f38f02bac24b07f29ed71 2.0-beta2
10 d49097c25d8049e730c254a2fed725a240ce4858 after-hg-migration
11 655348878731bcb5d9bbe0854077b052e75e5237 actual-start-from-scratch
12 12a658962d4e6dfdc9a1c350fe7b69e36e70675c 3.0-beta1
13 5c4180ad827b3f869b13b1d82f5a6ce617d6fcee 3.0-beta2
14 7ae24ca6f3891d5ac58ddc7db60ad413c8d6ec35 3.0-beta3
15 c40708b9088d622567fecc9208ad4a426621d364 3.0-beta4
16 b6456624eae74f49ae8683d8e7b2882a2ca0342a 3.0-rc1
17 65ee2328342f9d8796f4e395319318b8b69cfdc0 3.0.0
18 599fc4f7c736859f0fe97263cfa8686bbc2f4ad4 3.0.1
19 786d67eaed28d11ba6841e5664f6fe918964c25a 3.0.2
20 063c73f683ed4b91bb99c22463a12988e3db33c4 3.0.3
21 13a11181fc5a93ea5df7c59d1a8b4a6d41b8a39c 3.0.4
22 6e7488e20373d4435ef0c16dbccd53977d6735a5 3.0.5
0 SKIP /disabled/
1 SKIP /bench/
2 SKIP /build/
0 project(Eigen)
1
2 cmake_minimum_required(VERSION 2.6.2)
3
4 # guard against in-source builds
5
6 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
7 message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt. ")
8 endif()
9
10 # guard against bad build-type strings
11
12 if (NOT CMAKE_BUILD_TYPE)
13 set(CMAKE_BUILD_TYPE "Release")
14 endif()
15
16 string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
17 if( NOT cmake_build_type_tolower STREQUAL "debug"
18 AND NOT cmake_build_type_tolower STREQUAL "release"
19 AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
20 message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
21 endif()
22
23
24 #############################################################################
25 # retrieve version infomation #
26 #############################################################################
27
28 # automatically parse the version number
29 file(READ "${PROJECT_SOURCE_DIR}/Eigen/src/Core/util/Macros.h" _eigen_version_header)
30 string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen_world_version_match "${_eigen_version_header}")
31 set(EIGEN_WORLD_VERSION "${CMAKE_MATCH_1}")
32 string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen_major_version_match "${_eigen_version_header}")
33 set(EIGEN_MAJOR_VERSION "${CMAKE_MATCH_1}")
34 string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen_minor_version_match "${_eigen_version_header}")
35 set(EIGEN_MINOR_VERSION "${CMAKE_MATCH_1}")
36 set(EIGEN_VERSION_NUMBER ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION})
37
38 # if the mercurial program is absent, this will leave the EIGEN_HG_CHANGESET string empty,
39 # but won't stop CMake.
40 execute_process(COMMAND hg tip -R ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE EIGEN_HGTIP_OUTPUT)
41 execute_process(COMMAND hg branch -R ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE EIGEN_BRANCH_OUTPUT)
42
43 # if this is the default (aka development) branch, extract the mercurial changeset number from the hg tip output...
44 if(EIGEN_BRANCH_OUTPUT MATCHES "default")
45 string(REGEX MATCH "^changeset: *[0-9]*:([0-9;a-f]+).*" EIGEN_HG_CHANGESET_MATCH "${EIGEN_HGTIP_OUTPUT}")
46 set(EIGEN_HG_CHANGESET "${CMAKE_MATCH_1}")
47 endif(EIGEN_BRANCH_OUTPUT MATCHES "default")
48 #...and show it next to the version number
49 if(EIGEN_HG_CHANGESET)
50 set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER} (mercurial changeset ${EIGEN_HG_CHANGESET})")
51 else(EIGEN_HG_CHANGESET)
52 set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER}")
53 endif(EIGEN_HG_CHANGESET)
54
55
56 include(CheckCXXCompilerFlag)
57
58 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
59
60 #############################################################################
61 # find how to link to the standard libraries #
62 #############################################################################
63
64 find_package(StandardMathLibrary)
65
66 set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO "")
67
68 if(NOT STANDARD_MATH_LIBRARY_FOUND)
69
70 message(FATAL_ERROR
71 "Can't link to the standard math library. Please report to the Eigen developers, telling them about your platform.")
72
73 else()
74
75 if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
76 set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO "${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${STANDARD_MATH_LIBRARY}")
77 else()
78 set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO "${STANDARD_MATH_LIBRARY}")
79 endif()
80
81 endif()
82
83 if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
84 message(STATUS "Standard libraries to link to explicitly: ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO}")
85 else()
86 message(STATUS "Standard libraries to link to explicitly: none")
87 endif()
88
89 option(EIGEN_BUILD_BTL "Build benchmark suite" OFF)
90 if(NOT WIN32)
91 option(EIGEN_BUILD_PKGCONFIG "Build pkg-config .pc file for Eigen" ON)
92 endif(NOT WIN32)
93
94 set(CMAKE_INCLUDE_CURRENT_DIR ON)
95
96 option(EIGEN_SPLIT_LARGE_TESTS "Split large tests into smaller executables" ON)
97
98 option(EIGEN_DEFAULT_TO_ROW_MAJOR "Use row-major as default matrix storage order" OFF)
99 if(EIGEN_DEFAULT_TO_ROW_MAJOR)
100 add_definitions("-DEIGEN_DEFAULT_TO_ROW_MAJOR")
101 endif()
102
103 add_definitions("-DEIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS")
104
105 if(CMAKE_COMPILER_IS_GNUCXX)
106 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fexceptions -fno-check-new -fno-common -fstrict-aliasing")
107 set(CMAKE_CXX_FLAGS_DEBUG "-g3")
108 set(CMAKE_CXX_FLAGS_RELEASE "-g0 -O2")
109
110 check_cxx_compiler_flag("-Wno-variadic-macros" COMPILER_SUPPORT_WNOVARIADICMACRO)
111 if(COMPILER_SUPPORT_WNOVARIADICMACRO)
112 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros")
113 endif()
114
115 check_cxx_compiler_flag("-Wextra" COMPILER_SUPPORT_WEXTRA)
116 if(COMPILER_SUPPORT_WEXTRA)
117 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
118 endif()
119
120 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
121
122 option(EIGEN_TEST_SSE2 "Enable/Disable SSE2 in tests/examples" OFF)
123 if(EIGEN_TEST_SSE2)
124 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
125 message(STATUS "Enabling SSE2 in tests/examples")
126 endif()
127
128 option(EIGEN_TEST_SSE3 "Enable/Disable SSE3 in tests/examples" OFF)
129 if(EIGEN_TEST_SSE3)
130 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
131 message(STATUS "Enabling SSE3 in tests/examples")
132 endif()
133
134 option(EIGEN_TEST_SSSE3 "Enable/Disable SSSE3 in tests/examples" OFF)
135 if(EIGEN_TEST_SSSE3)
136 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3")
137 message(STATUS "Enabling SSSE3 in tests/examples")
138 endif()
139
140 option(EIGEN_TEST_SSE4_1 "Enable/Disable SSE4.1 in tests/examples" OFF)
141 if(EIGEN_TEST_SSE4_1)
142 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1")
143 message(STATUS "Enabling SSE4.1 in tests/examples")
144 endif()
145
146 option(EIGEN_TEST_SSE4_2 "Enable/Disable SSE4.2 in tests/examples" OFF)
147 if(EIGEN_TEST_SSE4_2)
148 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
149 message(STATUS "Enabling SSE4.2 in tests/examples")
150 endif()
151
152 option(EIGEN_TEST_ALTIVEC "Enable/Disable AltiVec in tests/examples" OFF)
153 if(EIGEN_TEST_ALTIVEC)
154 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec")
155 message(STATUS "Enabling AltiVec in tests/examples")
156 endif()
157
158 option(EIGEN_TEST_NEON "Enable/Disable Neon in tests/examples" OFF)
159 if(EIGEN_TEST_NEON)
160 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a8")
161 message(STATUS "Enabling NEON in tests/examples")
162 endif()
163
164 check_cxx_compiler_flag("-fopenmp" COMPILER_SUPPORT_OPENMP)
165 if(COMPILER_SUPPORT_OPENMP)
166 option(EIGEN_TEST_OPENMP "Enable/Disable OpenMP in tests/examples" OFF)
167 if(EIGEN_TEST_OPENMP)
168 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
169 message(STATUS "Enabling OpenMP in tests/examples")
170 endif()
171 endif()
172
173 endif(CMAKE_COMPILER_IS_GNUCXX)
174
175 if(MSVC)
176 # C4127 - conditional expression is constant
177 # C4714 - marked as __forceinline not inlined (I failed to deactivate it selectively)
178 # We can disable this warning in the unit tests since it is clear that it occurs
179 # because we are oftentimes returning objects that have a destructor or may
180 # throw exceptions - in particular in the unit tests we are throwing extra many
181 # exceptions to cover indexing errors.
182 # C4505 - unreferenced local function has been removed (impossible to deactive selectively)
183 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /wd4127 /wd4505 /wd4714")
184
185 # replace all /Wx by /W4
186 string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
187
188 check_cxx_compiler_flag("/openmp" COMPILER_SUPPORT_OPENMP)
189 if(COMPILER_SUPPORT_OPENMP)
190 option(EIGEN_TEST_OPENMP "Enable/Disable OpenMP in tests/examples" OFF)
191 if(EIGEN_TEST_OPENMP)
192 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
193 message(STATUS "Enabling OpenMP in tests/examples")
194 endif()
195 endif()
196
197 option(EIGEN_TEST_SSE2 "Enable/Disable SSE2 in tests/examples" OFF)
198 if(EIGEN_TEST_SSE2)
199 if(NOT CMAKE_CL_64)
200 # arch is not supported on 64 bit systems, SSE is enabled automatically.
201 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
202 endif(NOT CMAKE_CL_64)
203 message(STATUS "Enabling SSE2 in tests/examples")
204 endif(EIGEN_TEST_SSE2)
205 endif(MSVC)
206
207 option(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION "Disable explicit vectorization in tests/examples" OFF)
208 option(EIGEN_TEST_X87 "Force using X87 instructions. Implies no vectorization." OFF)
209 option(EIGEN_TEST_32BIT "Force generating 32bit code." OFF)
210
211 if(EIGEN_TEST_X87)
212 set(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION ON)
213 if(CMAKE_COMPILER_IS_GNUCXX)
214 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=387")
215 message(STATUS "Forcing use of x87 instructions in tests/examples")
216 else()
217 message(STATUS "EIGEN_TEST_X87 ignored on your compiler")
218 endif()
219 endif()
220
221 if(EIGEN_TEST_32BIT)
222 if(CMAKE_COMPILER_IS_GNUCXX)
223 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
224 message(STATUS "Forcing generation of 32-bit code in tests/examples")
225 else()
226 message(STATUS "EIGEN_TEST_32BIT ignored on your compiler")
227 endif()
228 endif()
229
230 if(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION)
231 add_definitions(-DEIGEN_DONT_VECTORIZE=1)
232 message(STATUS "Disabling vectorization in tests/examples")
233 endif()
234
235 option(EIGEN_TEST_NO_EXPLICIT_ALIGNMENT "Disable explicit alignment (hence vectorization) in tests/examples" OFF)
236 if(EIGEN_TEST_NO_EXPLICIT_ALIGNMENT)
237 add_definitions(-DEIGEN_DONT_ALIGN=1)
238 message(STATUS "Disabling alignment in tests/examples")
239 endif()
240
241 option(EIGEN_TEST_C++0x "Enables all C++0x features." OFF)
242
243 include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
244
245 # the user modifiable install path for header files
246 set(EIGEN_INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR} CACHE PATH "The directory where we install the header files (optional)")
247
248 # set the internal install path for header files which depends on wether the user modifiable
249 # EIGEN_INCLUDE_INSTALL_DIR has been set by the user or not.
250 if(EIGEN_INCLUDE_INSTALL_DIR)
251 set(INCLUDE_INSTALL_DIR
252 ${EIGEN_INCLUDE_INSTALL_DIR}
253 CACHE INTERNAL
254 "The directory where we install the header files (internal)"
255 )
256 else()
257 set(INCLUDE_INSTALL_DIR
258 "${CMAKE_INSTALL_PREFIX}/include/eigen3"
259 CACHE INTERNAL
260 "The directory where we install the header files (internal)"
261 )
262 endif()
263
264 # similar to set_target_properties but append the property instead of overwriting it
265 macro(ei_add_target_property target prop value)
266
267 get_target_property(previous ${target} ${prop})
268 # if the property wasn't previously set, ${previous} is now "previous-NOTFOUND" which cmake allows catching with plain if()
269 if(NOT previous)
270 set(previous "")
271 endif(NOT previous)
272 set_target_properties(${target} PROPERTIES ${prop} "${previous} ${value}")
273 endmacro(ei_add_target_property)
274
275 install(FILES
276 signature_of_eigen3_matrix_library
277 DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
278 )
279
280 if(EIGEN_BUILD_PKGCONFIG)
281 SET(path_separator ":")
282 STRING(REPLACE ${path_separator} ";" pkg_config_libdir_search "$ENV{PKG_CONFIG_LIBDIR}")
283 message(STATUS "searching for 'pkgconfig' directory in PKG_CONFIG_LIBDIR ( $ENV{PKG_CONFIG_LIBDIR} ), ${CMAKE_INSTALL_PREFIX}/share, and ${CMAKE_INSTALL_PREFIX}/lib")
284 FIND_PATH(pkg_config_libdir pkgconfig ${pkg_config_libdir_search} ${CMAKE_INSTALL_PREFIX}/share ${CMAKE_INSTALL_PREFIX}/lib ${pkg_config_libdir_search})
285 if(pkg_config_libdir)
286 SET(pkg_config_install_dir ${pkg_config_libdir})
287 message(STATUS "found ${pkg_config_libdir}/pkgconfig" )
288 else(pkg_config_libdir)
289 SET(pkg_config_install_dir ${CMAKE_INSTALL_PREFIX}/share)
290 message(STATUS "pkgconfig not found; installing in ${pkg_config_install_dir}" )
291 endif(pkg_config_libdir)
292
293 configure_file(eigen3.pc.in eigen3.pc)
294 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc
295 DESTINATION ${pkg_config_install_dir}/pkgconfig
296 )
297 endif(EIGEN_BUILD_PKGCONFIG)
298
299 add_subdirectory(Eigen)
300
301 add_subdirectory(doc EXCLUDE_FROM_ALL)
302
303 add_custom_target(buildtests)
304 add_custom_target(check COMMAND "ctest")
305 add_dependencies(check buildtests)
306
307 # CMake/Ctest does not allow us to change the build command,
308 # so we have to workaround by directly editing the generated DartConfiguration.tcl file
309 # save CMAKE_MAKE_PROGRAM
310 set(CMAKE_MAKE_PROGRAM_SAVE ${CMAKE_MAKE_PROGRAM})
311 # and set a fake one
312 set(CMAKE_MAKE_PROGRAM "@EIGEN_MAKECOMMAND_PLACEHOLDER@")
313
314 include(CTest)
315 enable_testing() # must be called from the root CMakeLists, see man page
316 include(EigenTesting)
317 ei_init_testing()
318
319 # overwrite default DartConfiguration.tcl
320 # The worarounds are different for each version of the MSVC IDE
321 if(MSVC_IDE)
322 if(MSVC_VERSION EQUAL 1600) # MSVC 2010
323 set(EIGEN_MAKECOMMAND_PLACEHOLDER "${CMAKE_MAKE_PROGRAM_SAVE} buildtests.vcxproj /p:Configuration=\${CTEST_CONFIGURATION_TYPE} \n # ")
324 else() # MSVC 2008 (TODO check MSVC 2005)
325 set(EIGEN_MAKECOMMAND_PLACEHOLDER "${CMAKE_MAKE_PROGRAM_SAVE} /project buildtests")
326 endif()
327 else()
328 # for make and nmake
329 set(EIGEN_MAKECOMMAND_PLACEHOLDER "${CMAKE_MAKE_PROGRAM_SAVE} buildtests")
330 endif()
331
332 configure_file(${CMAKE_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
333 # restore default CMAKE_MAKE_PROGRAM
334 set(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM_SAVE})
335 # un-set temporary variables so that it is like they never existed.
336 # CMake 2.6.3 introduces the more logical unset() syntax for this.
337 set(CMAKE_MAKE_PROGRAM_SAVE)
338 set(EIGEN_MAKECOMMAND_PLACEHOLDER)
339
340 configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
341
342
343 if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
344 add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
345 else()
346 add_subdirectory(test EXCLUDE_FROM_ALL)
347 endif()
348
349 if(NOT MSVC)
350 if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
351 add_subdirectory(blas)
352 add_subdirectory(lapack)
353 else()
354 add_subdirectory(blas EXCLUDE_FROM_ALL)
355 add_subdirectory(lapack EXCLUDE_FROM_ALL)
356 endif()
357 endif(NOT MSVC)
358
359 add_subdirectory(unsupported)
360
361 add_subdirectory(demos EXCLUDE_FROM_ALL)
362
363 # must be after test and unsupported, for configuring buildtests.in
364 add_subdirectory(scripts EXCLUDE_FROM_ALL)
365
366 # TODO: consider also replacing EIGEN_BUILD_BTL by a custom target "make btl"?
367 if(EIGEN_BUILD_BTL)
368 add_subdirectory(bench/btl EXCLUDE_FROM_ALL)
369 endif(EIGEN_BUILD_BTL)
370
371 ei_testing_print_summary()
372
373 message(STATUS "")
374 message(STATUS "Configured Eigen ${EIGEN_VERSION_NUMBER}")
375 message(STATUS "")
376
377 option(EIGEN_FAILTEST "Enable failtests." OFF)
378 if(EIGEN_FAILTEST)
379 add_subdirectory(failtest)
380 endif()
381
382 string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)
383 if(cmake_generator_tolower MATCHES "makefile")
384 message(STATUS "Some things you can do now:")
385 message(STATUS "--------------+--------------------------------------------------------------")
386 message(STATUS "Command | Description")
387 message(STATUS "--------------+--------------------------------------------------------------")
388 message(STATUS "make install | Install to ${CMAKE_INSTALL_PREFIX}. To change that:")
389 message(STATUS " | cmake . -DCMAKE_INSTALL_PREFIX=yourpath")
390 message(STATUS " | Eigen headers will then be installed to:")
391 message(STATUS " | ${INCLUDE_INSTALL_DIR}")
392 message(STATUS " | To install Eigen headers to a separate location, do:")
393 message(STATUS " | cmake . -DEIGEN_INCLUDE_INSTALL_DIR=yourpath")
394 message(STATUS "make doc | Generate the API documentation, requires Doxygen & LaTeX")
395 message(STATUS "make check | Build and run the unit-tests. Read this page:")
396 message(STATUS " | http://eigen.tuxfamily.org/index.php?title=Tests")
397 message(STATUS "make blas | Build BLAS library (not the same thing as Eigen)")
398 message(STATUS "--------------+--------------------------------------------------------------")
399 else()
400 message(STATUS "To build/run the unit tests, read this page:")
401 message(STATUS " http://eigen.tuxfamily.org/index.php?title=Tests")
402 endif()
403
404 message(STATUS "")
0 GNU GENERAL PUBLIC LICENSE
1 Version 3, 29 June 2007
2
3 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4 Everyone is permitted to copy and distribute verbatim copies
5 of this license document, but changing it is not allowed.
6
7 Preamble
8
9 The GNU General Public License is a free, copyleft license for
10 software and other kinds of works.
11
12 The licenses for most software and other practical works are designed
13 to take away your freedom to share and change the works. By contrast,
14 the GNU General Public License is intended to guarantee your freedom to
15 share and change all versions of a program--to make sure it remains free
16 software for all its users. We, the Free Software Foundation, use the
17 GNU General Public License for most of our software; it applies also to
18 any other work released this way by its authors. You can apply it to
19 your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22 price. Our General Public Licenses are designed to make sure that you
23 have the freedom to distribute copies of free software (and charge for
24 them if you wish), that you receive source code or can get it if you
25 want it, that you can change the software or use pieces of it in new
26 free programs, and that you know you can do these things.
27
28 To protect your rights, we need to prevent others from denying you
29 these rights or asking you to surrender the rights. Therefore, you have
30 certain responsibilities if you distribute copies of the software, or if
31 you modify it: responsibilities to respect the freedom of others.
32
33 For example, if you distribute copies of such a program, whether
34 gratis or for a fee, you must pass on to the recipients the same
35 freedoms that you received. You must make sure that they, too, receive
36 or can get the source code. And you must show them these terms so they
37 know their rights.
38
39 Developers that use the GNU GPL protect your rights with two steps:
40 (1) assert copyright on the software, and (2) offer you this License
41 giving you legal permission to copy, distribute and/or modify it.
42
43 For the developers' and authors' protection, the GPL clearly explains
44 that there is no warranty for this free software. For both users' and
45 authors' sake, the GPL requires that modified versions be marked as
46 changed, so that their problems will not be attributed erroneously to
47 authors of previous versions.
48
49 Some devices are designed to deny users access to install or run
50 modified versions of the software inside them, although the manufacturer
51 can do so. This is fundamentally incompatible with the aim of
52 protecting users' freedom to change the software. The systematic
53 pattern of such abuse occurs in the area of products for individuals to
54 use, which is precisely where it is most unacceptable. Therefore, we
55 have designed this version of the GPL to prohibit the practice for those
56 products. If such problems arise substantially in other domains, we
57 stand ready to extend this provision to those domains in future versions
58 of the GPL, as needed to protect the freedom of users.
59
60 Finally, every program is threatened constantly by software patents.
61 States should not allow patents to restrict development and use of
62 software on general-purpose computers, but in those that do, we wish to
63 avoid the special danger that patents applied to a free program could
64 make it effectively proprietary. To prevent this, the GPL assures that
65 patents cannot be used to render the program non-free.
66
67 The precise terms and conditions for copying, distribution and
68 modification follow.
69
70 TERMS AND CONDITIONS
71
72 0. Definitions.
73
74 "This License" refers to version 3 of the GNU General Public License.
75
76 "Copyright" also means copyright-like laws that apply to other kinds of
77 works, such as semiconductor masks.
78
79 "The Program" refers to any copyrightable work licensed under this
80 License. Each licensee is addressed as "you". "Licensees" and
81 "recipients" may be individuals or organizations.
82
83 To "modify" a work means to copy from or adapt all or part of the work
84 in a fashion requiring copyright permission, other than the making of an
85 exact copy. The resulting work is called a "modified version" of the
86 earlier work or a work "based on" the earlier work.
87
88 A "covered work" means either the unmodified Program or a work based
89 on the Program.
90
91 To "propagate" a work means to do anything with it that, without
92 permission, would make you directly or secondarily liable for
93 infringement under applicable copyright law, except executing it on a
94 computer or modifying a private copy. Propagation includes copying,
95 distribution (with or without modification), making available to the
96 public, and in some countries other activities as well.
97
98 To "convey" a work means any kind of propagation that enables other
99 parties to make or receive copies. Mere interaction with a user through
100 a computer network, with no transfer of a copy, is not conveying.
101
102 An interactive user interface displays "Appropriate Legal Notices"
103 to the extent that it includes a convenient and prominently visible
104 feature that (1) displays an appropriate copyright notice, and (2)
105 tells the user that there is no warranty for the work (except to the
106 extent that warranties are provided), that licensees may convey the
107 work under this License, and how to view a copy of this License. If
108 the interface presents a list of user commands or options, such as a
109 menu, a prominent item in the list meets this criterion.
110
111 1. Source Code.
112
113 The "source code" for a work means the preferred form of the work
114 for making modifications to it. "Object code" means any non-source
115 form of a work.
116
117 A "Standard Interface" means an interface that either is an official
118 standard defined by a recognized standards body, or, in the case of
119 interfaces specified for a particular programming language, one that
120 is widely used among developers working in that language.
121
122 The "System Libraries" of an executable work include anything, other
123 than the work as a whole, that (a) is included in the normal form of
124 packaging a Major Component, but which is not part of that Major
125 Component, and (b) serves only to enable use of the work with that
126 Major Component, or to implement a Standard Interface for which an
127 implementation is available to the public in source code form. A
128 "Major Component", in this context, means a major essential component
129 (kernel, window system, and so on) of the specific operating system
130 (if any) on which the executable work runs, or a compiler used to
131 produce the work, or an object code interpreter used to run it.
132
133 The "Corresponding Source" for a work in object code form means all
134 the source code needed to generate, install, and (for an executable
135 work) run the object code and to modify the work, including scripts to
136 control those activities. However, it does not include the work's
137 System Libraries, or general-purpose tools or generally available free
138 programs which are used unmodified in performing those activities but
139 which are not part of the work. For example, Corresponding Source
140 includes interface definition files associated with source files for
141 the work, and the source code for shared libraries and dynamically
142 linked subprograms that the work is specifically designed to require,
143 such as by intimate data communication or control flow between those
144 subprograms and other parts of the work.
145
146 The Corresponding Source need not include anything that users
147 can regenerate automatically from other parts of the Corresponding
148 Source.
149
150 The Corresponding Source for a work in source code form is that
151 same work.
152
153 2. Basic Permissions.
154
155 All rights granted under this License are granted for the term of
156 copyright on the Program, and are irrevocable provided the stated
157 conditions are met. This License explicitly affirms your unlimited
158 permission to run the unmodified Program. The output from running a
159 covered work is covered by this License only if the output, given its
160 content, constitutes a covered work. This License acknowledges your
161 rights of fair use or other equivalent, as provided by copyright law.
162
163 You may make, run and propagate covered works that you do not
164 convey, without conditions so long as your license otherwise remains
165 in force. You may convey covered works to others for the sole purpose
166 of having them make modifications exclusively for you, or provide you
167 with facilities for running those works, provided that you comply with
168 the terms of this License in conveying all material for which you do
169 not control copyright. Those thus making or running the covered works
170 for you must do so exclusively on your behalf, under your direction
171 and control, on terms that prohibit them from making any copies of
172 your copyrighted material outside their relationship with you.
173
174 Conveying under any other circumstances is permitted solely under
175 the conditions stated below. Sublicensing is not allowed; section 10
176 makes it unnecessary.
177
178 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
179
180 No covered work shall be deemed part of an effective technological
181 measure under any applicable law fulfilling obligations under article
182 11 of the WIPO copyright treaty adopted on 20 December 1996, or
183 similar laws prohibiting or restricting circumvention of such
184 measures.
185
186 When you convey a covered work, you waive any legal power to forbid
187 circumvention of technological measures to the extent such circumvention
188 is effected by exercising rights under this License with respect to
189 the covered work, and you disclaim any intention to limit operation or
190 modification of the work as a means of enforcing, against the work's
191 users, your or third parties' legal rights to forbid circumvention of
192 technological measures.
193
194 4. Conveying Verbatim Copies.
195
196 You may convey verbatim copies of the Program's source code as you
197 receive it, in any medium, provided that you conspicuously and
198 appropriately publish on each copy an appropriate copyright notice;
199 keep intact all notices stating that this License and any
200 non-permissive terms added in accord with section 7 apply to the code;
201 keep intact all notices of the absence of any warranty; and give all
202 recipients a copy of this License along with the Program.
203
204 You may charge any price or no price for each copy that you convey,
205 and you may offer support or warranty protection for a fee.
206
207 5. Conveying Modified Source Versions.
208
209 You may convey a work based on the Program, or the modifications to
210 produce it from the Program, in the form of source code under the
211 terms of section 4, provided that you also meet all of these conditions:
212
213 a) The work must carry prominent notices stating that you modified
214 it, and giving a relevant date.
215
216 b) The work must carry prominent notices stating that it is
217 released under this License and any conditions added under section
218 7. This requirement modifies the requirement in section 4 to
219 "keep intact all notices".
220
221 c) You must license the entire work, as a whole, under this
222 License to anyone who comes into possession of a copy. This
223 License will therefore apply, along with any applicable section 7
224 additional terms, to the whole of the work, and all its parts,
225 regardless of how they are packaged. This License gives no
226 permission to license the work in any other way, but it does not
227 invalidate such permission if you have separately received it.
228
229 d) If the work has interactive user interfaces, each must display
230 Appropriate Legal Notices; however, if the Program has interactive
231 interfaces that do not display Appropriate Legal Notices, your
232 work need not make them do so.
233
234 A compilation of a covered work with other separate and independent
235 works, which are not by their nature extensions of the covered work,
236 and which are not combined with it such as to form a larger program,
237 in or on a volume of a storage or distribution medium, is called an
238 "aggregate" if the compilation and its resulting copyright are not
239 used to limit the access or legal rights of the compilation's users
240 beyond what the individual works permit. Inclusion of a covered work
241 in an aggregate does not cause this License to apply to the other
242 parts of the aggregate.
243
244 6. Conveying Non-Source Forms.
245
246 You may convey a covered work in object code form under the terms
247 of sections 4 and 5, provided that you also convey the
248 machine-readable Corresponding Source under the terms of this License,
249 in one of these ways:
250
251 a) Convey the object code in, or embodied in, a physical product
252 (including a physical distribution medium), accompanied by the
253 Corresponding Source fixed on a durable physical medium
254 customarily used for software interchange.
255
256 b) Convey the object code in, or embodied in, a physical product
257 (including a physical distribution medium), accompanied by a
258 written offer, valid for at least three years and valid for as
259 long as you offer spare parts or customer support for that product
260 model, to give anyone who possesses the object code either (1) a
261 copy of the Corresponding Source for all the software in the
262 product that is covered by this License, on a durable physical
263 medium customarily used for software interchange, for a price no
264 more than your reasonable cost of physically performing this
265 conveying of source, or (2) access to copy the
266 Corresponding Source from a network server at no charge.
267
268 c) Convey individual copies of the object code with a copy of the
269 written offer to provide the Corresponding Source. This
270 alternative is allowed only occasionally and noncommercially, and
271 only if you received the object code with such an offer, in accord
272 with subsection 6b.
273
274 d) Convey the object code by offering access from a designated
275 place (gratis or for a charge), and offer equivalent access to the
276 Corresponding Source in the same way through the same place at no
277 further charge. You need not require recipients to copy the
278 Corresponding Source along with the object code. If the place to
279 copy the object code is a network server, the Corresponding Source
280 may be on a different server (operated by you or a third party)
281 that supports equivalent copying facilities, provided you maintain
282 clear directions next to the object code saying where to find the
283 Corresponding Source. Regardless of what server hosts the
284 Corresponding Source, you remain obligated to ensure that it is
285 available for as long as needed to satisfy these requirements.
286
287 e) Convey the object code using peer-to-peer transmission, provided
288 you inform other peers where the object code and Corresponding
289 Source of the work are being offered to the general public at no
290 charge under subsection 6d.
291
292 A separable portion of the object code, whose source code is excluded
293 from the Corresponding Source as a System Library, need not be
294 included in conveying the object code work.
295
296 A "User Product" is either (1) a "consumer product", which means any
297 tangible personal property which is normally used for personal, family,
298 or household purposes, or (2) anything designed or sold for incorporation
299 into a dwelling. In determining whether a product is a consumer product,
300 doubtful cases shall be resolved in favor of coverage. For a particular
301 product received by a particular user, "normally used" refers to a
302 typical or common use of that class of product, regardless of the status
303 of the particular user or of the way in which the particular user
304 actually uses, or expects or is expected to use, the product. A product
305 is a consumer product regardless of whether the product has substantial
306 commercial, industrial or non-consumer uses, unless such uses represent
307 the only significant mode of use of the product.
308
309 "Installation Information" for a User Product means any methods,
310 procedures, authorization keys, or other information required to install
311 and execute modified versions of a covered work in that User Product from
312 a modified version of its Corresponding Source. The information must
313 suffice to ensure that the continued functioning of the modified object
314 code is in no case prevented or interfered with solely because
315 modification has been made.
316
317 If you convey an object code work under this section in, or with, or
318 specifically for use in, a User Product, and the conveying occurs as
319 part of a transaction in which the right of possession and use of the
320 User Product is transferred to the recipient in perpetuity or for a
321 fixed term (regardless of how the transaction is characterized), the
322 Corresponding Source conveyed under this section must be accompanied
323 by the Installation Information. But this requirement does not apply
324 if neither you nor any third party retains the ability to install
325 modified object code on the User Product (for example, the work has
326 been installed in ROM).
327
328 The requirement to provide Installation Information does not include a
329 requirement to continue to provide support service, warranty, or updates
330 for a work that has been modified or installed by the recipient, or for
331 the User Product in which it has been modified or installed. Access to a
332 network may be denied when the modification itself materially and
333 adversely affects the operation of the network or violates the rules and
334 protocols for communication across the network.
335
336 Corresponding Source conveyed, and Installation Information provided,
337 in accord with this section must be in a format that is publicly
338 documented (and with an implementation available to the public in
339 source code form), and must require no special password or key for
340 unpacking, reading or copying.
341
342 7. Additional Terms.
343
344 "Additional permissions" are terms that supplement the terms of this
345 License by making exceptions from one or more of its conditions.
346 Additional permissions that are applicable to the entire Program shall
347 be treated as though they were included in this License, to the extent
348 that they are valid under applicable law. If additional permissions
349 apply only to part of the Program, that part may be used separately
350 under those permissions, but the entire Program remains governed by
351 this License without regard to the additional permissions.
352
353 When you convey a copy of a covered work, you may at your option
354 remove any additional permissions from that copy, or from any part of
355 it. (Additional permissions may be written to require their own
356 removal in certain cases when you modify the work.) You may place
357 additional permissions on material, added by you to a covered work,
358 for which you have or can give appropriate copyright permission.
359
360 Notwithstanding any other provision of this License, for material you
361 add to a covered work, you may (if authorized by the copyright holders of
362 that material) supplement the terms of this License with terms:
363
364 a) Disclaiming warranty or limiting liability differently from the
365 terms of sections 15 and 16 of this License; or
366
367 b) Requiring preservation of specified reasonable legal notices or
368 author attributions in that material or in the Appropriate Legal
369 Notices displayed by works containing it; or
370
371 c) Prohibiting misrepresentation of the origin of that material, or
372 requiring that modified versions of such material be marked in
373 reasonable ways as different from the original version; or
374
375 d) Limiting the use for publicity purposes of names of licensors or
376 authors of the material; or
377
378 e) Declining to grant rights under trademark law for use of some
379 trade names, trademarks, or service marks; or
380
381 f) Requiring indemnification of licensors and authors of that
382 material by anyone who conveys the material (or modified versions of
383 it) with contractual assumptions of liability to the recipient, for
384 any liability that these contractual assumptions directly impose on
385 those licensors and authors.
386
387 All other non-permissive additional terms are considered "further
388 restrictions" within the meaning of section 10. If the Program as you
389 received it, or any part of it, contains a notice stating that it is
390 governed by this License along with a term that is a further
391 restriction, you may remove that term. If a license document contains
392 a further restriction but permits relicensing or conveying under this
393 License, you may add to a covered work material governed by the terms
394 of that license document, provided that the further restriction does
395 not survive such relicensing or conveying.
396
397 If you add terms to a covered work in accord with this section, you
398 must place, in the relevant source files, a statement of the
399 additional terms that apply to those files, or a notice indicating
400 where to find the applicable terms.
401
402 Additional terms, permissive or non-permissive, may be stated in the
403 form of a separately written license, or stated as exceptions;
404 the above requirements apply either way.
405
406 8. Termination.
407
408 You may not propagate or modify a covered work except as expressly
409 provided under this License. Any attempt otherwise to propagate or
410 modify it is void, and will automatically terminate your rights under
411 this License (including any patent licenses granted under the third
412 paragraph of section 11).
413
414 However, if you cease all violation of this License, then your
415 license from a particular copyright holder is reinstated (a)
416 provisionally, unless and until the copyright holder explicitly and
417 finally terminates your license, and (b) permanently, if the copyright
418 holder fails to notify you of the violation by some reasonable means
419 prior to 60 days after the cessation.
420
421 Moreover, your license from a particular copyright holder is
422 reinstated permanently if the copyright holder notifies you of the
423 violation by some reasonable means, this is the first time you have
424 received notice of violation of this License (for any work) from that
425 copyright holder, and you cure the violation prior to 30 days after
426 your receipt of the notice.
427
428 Termination of your rights under this section does not terminate the
429 licenses of parties who have received copies or rights from you under
430 this License. If your rights have been terminated and not permanently
431 reinstated, you do not qualify to receive new licenses for the same
432 material under section 10.
433
434 9. Acceptance Not Required for Having Copies.
435
436 You are not required to accept this License in order to receive or
437 run a copy of the Program. Ancillary propagation of a covered work
438 occurring solely as a consequence of using peer-to-peer transmission
439 to receive a copy likewise does not require acceptance. However,
440 nothing other than this License grants you permission to propagate or
441 modify any covered work. These actions infringe copyright if you do
442 not accept this License. Therefore, by modifying or propagating a
443 covered work, you indicate your acceptance of this License to do so.
444
445 10. Automatic Licensing of Downstream Recipients.
446
447 Each time you convey a covered work, the recipient automatically
448 receives a license from the original licensors, to run, modify and
449 propagate that work, subject to this License. You are not responsible
450 for enforcing compliance by third parties with this License.
451
452 An "entity transaction" is a transaction transferring control of an
453 organization, or substantially all assets of one, or subdividing an
454 organization, or merging organizations. If propagation of a covered
455 work results from an entity transaction, each party to that
456 transaction who receives a copy of the work also receives whatever
457 licenses to the work the party's predecessor in interest had or could
458 give under the previous paragraph, plus a right to possession of the
459 Corresponding Source of the work from the predecessor in interest, if
460 the predecessor has it or can get it with reasonable efforts.
461
462 You may not impose any further restrictions on the exercise of the
463 rights granted or affirmed under this License. For example, you may
464 not impose a license fee, royalty, or other charge for exercise of
465 rights granted under this License, and you may not initiate litigation
466 (including a cross-claim or counterclaim in a lawsuit) alleging that
467 any patent claim is infringed by making, using, selling, offering for
468 sale, or importing the Program or any portion of it.
469
470 11. Patents.
471
472 A "contributor" is a copyright holder who authorizes use under this
473 License of the Program or a work on which the Program is based. The
474 work thus licensed is called the contributor's "contributor version".
475
476 A contributor's "essential patent claims" are all patent claims
477 owned or controlled by the contributor, whether already acquired or
478 hereafter acquired, that would be infringed by some manner, permitted
479 by this License, of making, using, or selling its contributor version,
480 but do not include claims that would be infringed only as a
481 consequence of further modification of the contributor version. For
482 purposes of this definition, "control" includes the right to grant
483 patent sublicenses in a manner consistent with the requirements of
484 this License.
485
486 Each contributor grants you a non-exclusive, worldwide, royalty-free
487 patent license under the contributor's essential patent claims, to
488 make, use, sell, offer for sale, import and otherwise run, modify and
489 propagate the contents of its contributor version.
490
491 In the following three paragraphs, a "patent license" is any express
492 agreement or commitment, however denominated, not to enforce a patent
493 (such as an express permission to practice a patent or covenant not to
494 sue for patent infringement). To "grant" such a patent license to a
495 party means to make such an agreement or commitment not to enforce a
496 patent against the party.
497
498 If you convey a covered work, knowingly relying on a patent license,
499 and the Corresponding Source of the work is not available for anyone
500 to copy, free of charge and under the terms of this License, through a
501 publicly available network server or other readily accessible means,
502 then you must either (1) cause the Corresponding Source to be so
503 available, or (2) arrange to deprive yourself of the benefit of the
504 patent license for this particular work, or (3) arrange, in a manner
505 consistent with the requirements of this License, to extend the patent
506 license to downstream recipients. "Knowingly relying" means you have
507 actual knowledge that, but for the patent license, your conveying the
508 covered work in a country, or your recipient's use of the covered work
509 in a country, would infringe one or more identifiable patents in that
510 country that you have reason to believe are valid.
511
512 If, pursuant to or in connection with a single transaction or
513 arrangement, you convey, or propagate by procuring conveyance of, a
514 covered work, and grant a patent license to some of the parties
515 receiving the covered work authorizing them to use, propagate, modify
516 or convey a specific copy of the covered work, then the patent license
517 you grant is automatically extended to all recipients of the covered
518 work and works based on it.
519
520 A patent license is "discriminatory" if it does not include within
521 the scope of its coverage, prohibits the exercise of, or is
522 conditioned on the non-exercise of one or more of the rights that are
523 specifically granted under this License. You may not convey a covered
524 work if you are a party to an arrangement with a third party that is
525 in the business of distributing software, under which you make payment
526 to the third party based on the extent of your activity of conveying
527 the work, and under which the third party grants, to any of the
528 parties who would receive the covered work from you, a discriminatory
529 patent license (a) in connection with copies of the covered work
530 conveyed by you (or copies made from those copies), or (b) primarily
531 for and in connection with specific products or compilations that
532 contain the covered work, unless you entered into that arrangement,
533 or that patent license was granted, prior to 28 March 2007.
534
535 Nothing in this License shall be construed as excluding or limiting
536 any implied license or other defenses to infringement that may
537 otherwise be available to you under applicable patent law.
538
539 12. No Surrender of Others' Freedom.
540
541 If conditions are imposed on you (whether by court order, agreement or
542 otherwise) that contradict the conditions of this License, they do not
543 excuse you from the conditions of this License. If you cannot convey a
544 covered work so as to satisfy simultaneously your obligations under this
545 License and any other pertinent obligations, then as a consequence you may
546 not convey it at all. For example, if you agree to terms that obligate you
547 to collect a royalty for further conveying from those to whom you convey
548 the Program, the only way you could satisfy both those terms and this
549 License would be to refrain entirely from conveying the Program.
550
551 13. Use with the GNU Affero General Public License.
552
553 Notwithstanding any other provision of this License, you have
554 permission to link or combine any covered work with a work licensed
555 under version 3 of the GNU Affero General Public License into a single
556 combined work, and to convey the resulting work. The terms of this
557 License will continue to apply to the part which is the covered work,
558 but the special requirements of the GNU Affero General Public License,
559 section 13, concerning interaction through a network will apply to the
560 combination as such.
561
562 14. Revised Versions of this License.
563
564 The Free Software Foundation may publish revised and/or new versions of
565 the GNU General Public License from time to time. Such new versions will
566 be similar in spirit to the present version, but may differ in detail to
567 address new problems or concerns.
568
569 Each version is given a distinguishing version number. If the
570 Program specifies that a certain numbered version of the GNU General
571 Public License "or any later version" applies to it, you have the
572 option of following the terms and conditions either of that numbered
573 version or of any later version published by the Free Software
574 Foundation. If the Program does not specify a version number of the
575 GNU General Public License, you may choose any version ever published
576 by the Free Software Foundation.
577
578 If the Program specifies that a proxy can decide which future
579 versions of the GNU General Public License can be used, that proxy's
580 public statement of acceptance of a version permanently authorizes you
581 to choose that version for the Program.
582
583 Later license versions may give you additional or different
584 permissions. However, no additional obligations are imposed on any
585 author or copyright holder as a result of your choosing to follow a
586 later version.
587
588 15. Disclaimer of Warranty.
589
590 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
591 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
592 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
593 OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
594 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
595 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
596 IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
597 ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
598
599 16. Limitation of Liability.
600
601 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
602 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
603 THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
604 GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
605 USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
606 DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
607 PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
608 EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
609 SUCH DAMAGES.
610
611 17. Interpretation of Sections 15 and 16.
612
613 If the disclaimer of warranty and limitation of liability provided
614 above cannot be given local legal effect according to their terms,
615 reviewing courts shall apply local law that most closely approximates
616 an absolute waiver of all civil liability in connection with the
617 Program, unless a warranty or assumption of liability accompanies a
618 copy of the Program in return for a fee.
619
620 END OF TERMS AND CONDITIONS
621
622 How to Apply These Terms to Your New Programs
623
624 If you develop a new program, and you want it to be of the greatest
625 possible use to the public, the best way to achieve this is to make it
626 free software which everyone can redistribute and change under these terms.
627
628 To do so, attach the following notices to the program. It is safest
629 to attach them to the start of each source file to most effectively
630 state the exclusion of warranty; and each file should have at least
631 the "copyright" line and a pointer to where the full notice is found.
632
633 <one line to give the program's name and a brief idea of what it does.>
634 Copyright (C) <year> <name of author>
635
636 This program is free software: you can redistribute it and/or modify
637 it under the terms of the GNU General Public License as published by
638 the Free Software Foundation, either version 3 of the License, or
639 (at your option) any later version.
640
641 This program is distributed in the hope that it will be useful,
642 but WITHOUT ANY WARRANTY; without even the implied warranty of
643 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644 GNU General Public License for more details.
645
646 You should have received a copy of the GNU General Public License
647 along with this program. If not, see <http://www.gnu.org/licenses/>.
648
649 Also add information on how to contact you by electronic and paper mail.
650
651 If the program does terminal interaction, make it output a short
652 notice like this when it starts in an interactive mode:
653
654 <program> Copyright (C) <year> <name of author>
655 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
656 This is free software, and you are welcome to redistribute it
657 under certain conditions; type `show c' for details.
658
659 The hypothetical commands `show w' and `show c' should show the appropriate
660 parts of the General Public License. Of course, your program's commands
661 might be different; for a GUI interface, you would use an "about box".
662
663 You should also get your employer (if you work as a programmer) or school,
664 if any, to sign a "copyright disclaimer" for the program, if necessary.
665 For more information on this, and how to apply and follow the GNU GPL, see
666 <http://www.gnu.org/licenses/>.
667
668 The GNU General Public License does not permit incorporating your program
669 into proprietary programs. If your program is a subroutine library, you
670 may consider it more useful to permit linking proprietary applications with
671 the library. If this is what you want to do, use the GNU Lesser General
672 Public License instead of this License. But first, please read
673 <http://www.gnu.org/philosophy/why-not-lgpl.html>.
0 GNU LESSER GENERAL PUBLIC LICENSE
1 Version 3, 29 June 2007
2
3 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4 Everyone is permitted to copy and distribute verbatim copies
5 of this license document, but changing it is not allowed.
6
7
8 This version of the GNU Lesser General Public License incorporates
9 the terms and conditions of version 3 of the GNU General Public
10 License, supplemented by the additional permissions listed below.
11
12 0. Additional Definitions.
13
14 As used herein, "this License" refers to version 3 of the GNU Lesser
15 General Public License, and the "GNU GPL" refers to version 3 of the GNU
16 General Public License.
17
18 "The Library" refers to a covered work governed by this License,
19 other than an Application or a Combined Work as defined below.
20
21 An "Application" is any work that makes use of an interface provided
22 by the Library, but which is not otherwise based on the Library.
23 Defining a subclass of a class defined by the Library is deemed a mode
24 of using an interface provided by the Library.
25
26 A "Combined Work" is a work produced by combining or linking an
27 Application with the Library. The particular version of the Library
28 with which the Combined Work was made is also called the "Linked
29 Version".
30
31 The "Minimal Corresponding Source" for a Combined Work means the
32 Corresponding Source for the Combined Work, excluding any source code
33 for portions of the Combined Work that, considered in isolation, are
34 based on the Application, and not on the Linked Version.
35
36 The "Corresponding Application Code" for a Combined Work means the
37 object code and/or source code for the Application, including any data
38 and utility programs needed for reproducing the Combined Work from the
39 Application, but excluding the System Libraries of the Combined Work.
40
41 1. Exception to Section 3 of the GNU GPL.
42
43 You may convey a covered work under sections 3 and 4 of this License
44 without being bound by section 3 of the GNU GPL.
45
46 2. Conveying Modified Versions.
47
48 If you modify a copy of the Library, and, in your modifications, a
49 facility refers to a function or data to be supplied by an Application
50 that uses the facility (other than as an argument passed when the
51 facility is invoked), then you may convey a copy of the modified
52 version:
53
54 a) under this License, provided that you make a good faith effort to
55 ensure that, in the event an Application does not supply the
56 function or data, the facility still operates, and performs
57 whatever part of its purpose remains meaningful, or
58
59 b) under the GNU GPL, with none of the additional permissions of
60 this License applicable to that copy.
61
62 3. Object Code Incorporating Material from Library Header Files.
63
64 The object code form of an Application may incorporate material from
65 a header file that is part of the Library. You may convey such object
66 code under terms of your choice, provided that, if the incorporated
67 material is not limited to numerical parameters, data structure
68 layouts and accessors, or small macros, inline functions and templates
69 (ten or fewer lines in length), you do both of the following:
70
71 a) Give prominent notice with each copy of the object code that the
72 Library is used in it and that the Library and its use are
73 covered by this License.
74
75 b) Accompany the object code with a copy of the GNU GPL and this license
76 document.
77
78 4. Combined Works.
79
80 You may convey a Combined Work under terms of your choice that,
81 taken together, effectively do not restrict modification of the
82 portions of the Library contained in the Combined Work and reverse
83 engineering for debugging such modifications, if you also do each of
84 the following:
85
86 a) Give prominent notice with each copy of the Combined Work that
87 the Library is used in it and that the Library and its use are
88 covered by this License.
89
90 b) Accompany the Combined Work with a copy of the GNU GPL and this license
91 document.
92
93 c) For a Combined Work that displays copyright notices during
94 execution, include the copyright notice for the Library among
95 these notices, as well as a reference directing the user to the
96 copies of the GNU GPL and this license document.
97
98 d) Do one of the following:
99
100 0) Convey the Minimal Corresponding Source under the terms of this
101 License, and the Corresponding Application Code in a form
102 suitable for, and under terms that permit, the user to
103 recombine or relink the Application with a modified version of
104 the Linked Version to produce a modified Combined Work, in the
105 manner specified by section 6 of the GNU GPL for conveying
106 Corresponding Source.
107
108 1) Use a suitable shared library mechanism for linking with the
109 Library. A suitable mechanism is one that (a) uses at run time
110 a copy of the Library already present on the user's computer
111 system, and (b) will operate properly with a modified version
112 of the Library that is interface-compatible with the Linked
113 Version.
114
115 e) Provide Installation Information, but only if you would otherwise
116 be required to provide such information under section 6 of the
117 GNU GPL, and only to the extent that such information is
118 necessary to install and execute a modified version of the
119 Combined Work produced by recombining or relinking the
120 Application with a modified version of the Linked Version. (If
121 you use option 4d0, the Installation Information must accompany
122 the Minimal Corresponding Source and Corresponding Application
123 Code. If you use option 4d1, you must provide the Installation
124 Information in the manner specified by section 6 of the GNU GPL
125 for conveying Corresponding Source.)
126
127 5. Combined Libraries.
128
129 You may place library facilities that are a work based on the
130 Library side by side in a single library together with other library
131 facilities that are not Applications and are not covered by this
132 License, and convey such a combined library under terms of your
133 choice, if you do both of the following:
134
135 a) Accompany the combined library with a copy of the same work based
136 on the Library, uncombined with any other library facilities,
137 conveyed under the terms of this License.
138
139 b) Give prominent notice with the combined library that part of it
140 is a work based on the Library, and explaining where to find the
141 accompanying uncombined form of the same work.
142
143 6. Revised Versions of the GNU Lesser General Public License.
144
145 The Free Software Foundation may publish revised and/or new versions
146 of the GNU Lesser General Public License from time to time. Such new
147 versions will be similar in spirit to the present version, but may
148 differ in detail to address new problems or concerns.
149
150 Each version is given a distinguishing version number. If the
151 Library as you received it specifies that a certain numbered version
152 of the GNU Lesser General Public License "or any later version"
153 applies to it, you have the option of following the terms and
154 conditions either of that published version or of any later version
155 published by the Free Software Foundation. If the Library as you
156 received it does not specify a version number of the GNU Lesser
157 General Public License, you may choose any version of the GNU Lesser
158 General Public License ever published by the Free Software Foundation.
159
160 If the Library as you received it specifies that a proxy can decide
161 whether future versions of the GNU Lesser General Public License shall
162 apply, that proxy's public statement of acceptance of any version is
163 permanent authorization for you to choose that version for the
164 Library.
0 ## This file should be placed in the root directory of your project.
1 ## Then modify the CMakeLists.txt file in the root directory of your
2 ## project to incorporate the testing dashboard.
3 ## # The following are required to uses Dart and the Cdash dashboard
4 ## ENABLE_TESTING()
5 ## INCLUDE(CTest)
6 set(CTEST_PROJECT_NAME "Eigen")
7 set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")
8
9 set(CTEST_DROP_METHOD "http")
10 set(CTEST_DROP_SITE "manao.inria.fr")
11 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen")
12 set(CTEST_DROP_SITE_CDASH TRUE)
0
1 ## A tribute to Dynamic!
2 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "33331")
3 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "33331")
0 #ifndef EIGEN_ARRAY_MODULE_H
1 #define EIGEN_ARRAY_MODULE_H
2
3 // include Core first to handle Eigen2 support macros
4 #include "Core"
5
6 #ifndef EIGEN2_SUPPORT
7 #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core.
8 #endif
9
10 #endif // EIGEN_ARRAY_MODULE_H
0 include(RegexUtils)
1 test_escape_string_as_regex()
2
3 file(GLOB Eigen_directory_files "*")
4
5 escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
6
7 foreach(f ${Eigen_directory_files})
8 if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
9 list(APPEND Eigen_directory_files_to_install ${f})
10 endif()
11 endforeach(f ${Eigen_directory_files})
12
13 install(FILES
14 ${Eigen_directory_files_to_install}
15 DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
16 )
17
18 add_subdirectory(src)
0 #ifndef EIGEN_CHOLESKY_MODULE_H
1 #define EIGEN_CHOLESKY_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 namespace Eigen {
8
9 /** \defgroup Cholesky_Module Cholesky module
10 *
11 *
12 *
13 * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
14 * Those decompositions are accessible via the following MatrixBase methods:
15 * - MatrixBase::llt(),
16 * - MatrixBase::ldlt()
17 *
18 * \code
19 * #include <Eigen/Cholesky>
20 * \endcode
21 */
22
23 #include "src/misc/Solve.h"
24 #include "src/Cholesky/LLT.h"
25 #include "src/Cholesky/LDLT.h"
26
27 } // namespace Eigen
28
29 #include "src/Core/util/ReenableStupidWarnings.h"
30
31 #endif // EIGEN_CHOLESKY_MODULE_H
32 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0 // This file is part of Eigen, a lightweight C++ template library
1 // for linear algebra.
2 //
3 // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
4 // Copyright (C) 2007-2011 Benoit Jacob <jacob.benoit.1@gmail.com>
5 //
6 // Eigen is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 3 of the License, or (at your option) any later version.
10 //
11 // Alternatively, you can redistribute it and/or
12 // modify it under the terms of the GNU General Public License as
13 // published by the Free Software Foundation; either version 2 of
14 // the License, or (at your option) any later version.
15 //
16 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public
22 // License and a copy of the GNU General Public License along with
23 // Eigen. If not, see <http://www.gnu.org/licenses/>.
24
25 #ifndef EIGEN_CORE_H
26 #define EIGEN_CORE_H
27
28 // first thing Eigen does: stop the compiler from committing suicide
29 #include "src/Core/util/DisableStupidWarnings.h"
30
31 // then include this file where all our macros are defined. It's really important to do it first because
32 // it's where we do all the alignment settings (platform detection and honoring the user's will if he
33 // defined e.g. EIGEN_DONT_ALIGN) so it needs to be done before we do anything with vectorization.
34 #include "src/Core/util/Macros.h"
35
36 // if alignment is disabled, then disable vectorization. Note: EIGEN_ALIGN is the proper check, it takes into
37 // account both the user's will (EIGEN_DONT_ALIGN) and our own platform checks
38 #if !EIGEN_ALIGN
39 #ifndef EIGEN_DONT_VECTORIZE
40 #define EIGEN_DONT_VECTORIZE
41 #endif
42 #endif
43
44 #ifdef _MSC_VER
45 #include <malloc.h> // for _aligned_malloc -- need it regardless of whether vectorization is enabled
46 #if (_MSC_VER >= 1500) // 2008 or later
47 // Remember that usage of defined() in a #define is undefined by the standard.
48 // a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP.
49 #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(_M_X64)
50 #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER
51 #endif
52 #endif
53 #else
54 // Remember that usage of defined() in a #define is undefined by the standard
55 #if (defined __SSE2__) && ( (!defined __GNUC__) || EIGEN_GNUC_AT_LEAST(4,2) )
56 #define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC
57 #endif
58 #endif
59
60 #ifndef EIGEN_DONT_VECTORIZE
61
62 #if defined (EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER)
63
64 // Defines symbols for compile-time detection of which instructions are
65 // used.
66 // EIGEN_VECTORIZE_YY is defined if and only if the instruction set YY is used
67 #define EIGEN_VECTORIZE
68 #define EIGEN_VECTORIZE_SSE
69 #define EIGEN_VECTORIZE_SSE2
70
71 // Detect sse3/ssse3/sse4:
72 // gcc and icc defines __SSE3__, ...
73 // there is no way to know about this on msvc. You can define EIGEN_VECTORIZE_SSE* if you
74 // want to force the use of those instructions with msvc.
75 #ifdef __SSE3__
76 #define EIGEN_VECTORIZE_SSE3
77 #endif
78 #ifdef __SSSE3__
79 #define EIGEN_VECTORIZE_SSSE3
80 #endif
81 #ifdef __SSE4_1__
82 #define EIGEN_VECTORIZE_SSE4_1
83 #endif
84 #ifdef __SSE4_2__
85 #define EIGEN_VECTORIZE_SSE4_2
86 #endif
87
88 // include files
89
90 // This extern "C" works around a MINGW-w64 compilation issue
91 // https://sourceforge.net/tracker/index.php?func=detail&aid=3018394&group_id=202880&atid=983354
92 // In essence, intrin.h is included by windows.h and also declares intrinsics (just as emmintrin.h etc. below do).
93 // However, intrin.h uses an extern "C" declaration, and g++ thus complains of duplicate declarations
94 // with conflicting linkage. The linkage for intrinsics doesn't matter, but at that stage the compiler doesn't know;
95 // so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern "C" here too.
96 // notice that since these are C headers, the extern "C" is theoretically needed anyways.
97 extern "C" {
98 #include <emmintrin.h>
99 #include <xmmintrin.h>
100 #ifdef EIGEN_VECTORIZE_SSE3
101 #include <pmmintrin.h>
102 #endif
103 #ifdef EIGEN_VECTORIZE_SSSE3
104 #include <tmmintrin.h>
105 #endif
106 #ifdef EIGEN_VECTORIZE_SSE4_1
107 #include <smmintrin.h>
108 #endif
109 #ifdef EIGEN_VECTORIZE_SSE4_2
110 #include <nmmintrin.h>
111 #endif
112 } // end extern "C"
113 #elif defined __ALTIVEC__
114 #define EIGEN_VECTORIZE
115 #define EIGEN_VECTORIZE_ALTIVEC
116 #include <altivec.h>
117 // We need to #undef all these ugly tokens defined in <altivec.h>
118 // => use __vector instead of vector
119 #undef bool
120 #undef vector
121 #undef pixel
122 #elif defined __ARM_NEON__
123 #define EIGEN_VECTORIZE
124 #define EIGEN_VECTORIZE_NEON
125 #include <arm_neon.h>
126 #endif
127 #endif
128
129 #if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE)
130 #define EIGEN_HAS_OPENMP
131 #endif
132
133 #ifdef EIGEN_HAS_OPENMP
134 #include <omp.h>
135 #endif
136
137 // MSVC for windows mobile does not have the errno.h file
138 #if !(defined(_MSC_VER) && defined(_WIN32_WCE)) && !defined(__ARMCC_VERSION)
139 #define EIGEN_HAS_ERRNO
140 #endif
141
142 #ifdef EIGEN_HAS_ERRNO
143 #include <cerrno>
144 #endif
145 #include <cstddef>
146 #include <cstdlib>
147 #include <cmath>
148 #include <complex>
149 #include <cassert>
150 #include <functional>
151 #include <iosfwd>
152 #include <cstring>
153 #include <string>
154 #include <limits>
155 #include <climits> // for CHAR_BIT
156 // for min/max:
157 #include <algorithm>
158
159 // for outputting debug info
160 #ifdef EIGEN_DEBUG_ASSIGN
161 #include <iostream>
162 #endif
163
164 // required for __cpuid, needs to be included after cmath
165 #if defined(_MSC_VER) && (defined(_M_IX86)||defined(_M_X64))
166 #include <intrin.h>
167 #endif
168
169 #if defined(_CPPUNWIND) || defined(__EXCEPTIONS)
170 #define EIGEN_EXCEPTIONS
171 #endif
172
173 #ifdef EIGEN_EXCEPTIONS
174 #include <new>
175 #endif
176
177 // defined in bits/termios.h
178 #undef B0
179
180 /** \brief Namespace containing all symbols from the %Eigen library. */
181 namespace Eigen {
182
183 inline static const char *SimdInstructionSetsInUse(void) {
184 #if defined(EIGEN_VECTORIZE_SSE4_2)
185 return "SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
186 #elif defined(EIGEN_VECTORIZE_SSE4_1)
187 return "SSE, SSE2, SSE3, SSSE3, SSE4.1";
188 #elif defined(EIGEN_VECTORIZE_SSSE3)
189 return "SSE, SSE2, SSE3, SSSE3";
190 #elif defined(EIGEN_VECTORIZE_SSE3)
191 return "SSE, SSE2, SSE3";
192 #elif defined(EIGEN_VECTORIZE_SSE2)
193 return "SSE, SSE2";
194 #elif defined(EIGEN_VECTORIZE_ALTIVEC)
195 return "AltiVec";
196 #elif defined(EIGEN_VECTORIZE_NEON)
197 return "ARM NEON";
198 #else
199 return "None";
200 #endif
201 }
202
203 #define STAGE10_FULL_EIGEN2_API 10
204 #define STAGE20_RESOLVE_API_CONFLICTS 20
205 #define STAGE30_FULL_EIGEN3_API 30
206 #define STAGE40_FULL_EIGEN3_STRICTNESS 40
207 #define STAGE99_NO_EIGEN2_SUPPORT 99
208
209 #if defined EIGEN2_SUPPORT_STAGE40_FULL_EIGEN3_STRICTNESS
210 #define EIGEN2_SUPPORT
211 #define EIGEN2_SUPPORT_STAGE STAGE40_FULL_EIGEN3_STRICTNESS
212 #elif defined EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API
213 #define EIGEN2_SUPPORT
214 #define EIGEN2_SUPPORT_STAGE STAGE30_FULL_EIGEN3_API
215 #elif defined EIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS
216 #define EIGEN2_SUPPORT
217 #define EIGEN2_SUPPORT_STAGE STAGE20_RESOLVE_API_CONFLICTS
218 #elif defined EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API
219 #define EIGEN2_SUPPORT
220 #define EIGEN2_SUPPORT_STAGE STAGE10_FULL_EIGEN2_API
221 #elif defined EIGEN2_SUPPORT
222 // default to stage 3, that's what it's always meant
223 #define EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API
224 #define EIGEN2_SUPPORT_STAGE STAGE30_FULL_EIGEN3_API
225 #else
226 #define EIGEN2_SUPPORT_STAGE STAGE99_NO_EIGEN2_SUPPORT
227 #endif
228
229 #ifdef EIGEN2_SUPPORT
230 #undef minor
231 #endif
232
233 // we use size_t frequently and we'll never remember to prepend it with std:: everytime just to
234 // ensure QNX/QCC support
235 using std::size_t;
236 // gcc 4.6.0 wants std:: for ptrdiff_t
237 using std::ptrdiff_t;
238
239 /** \defgroup Core_Module Core module
240 * This is the main module of Eigen providing dense matrix and vector support
241 * (both fixed and dynamic size) with all the features corresponding to a BLAS library
242 * and much more...
243 *
244 * \code
245 * #include <Eigen/Core>
246 * \endcode
247 */
248
249 #include "src/Core/util/Constants.h"
250 #include "src/Core/util/ForwardDeclarations.h"
251 #include "src/Core/util/Meta.h"
252 #include "src/Core/util/XprHelper.h"
253 #include "src/Core/util/StaticAssert.h"
254 #include "src/Core/util/Memory.h"
255
256 #include "src/Core/NumTraits.h"
257 #include "src/Core/MathFunctions.h"
258 #include "src/Core/GenericPacketMath.h"
259
260 #if defined EIGEN_VECTORIZE_SSE
261 #include "src/Core/arch/SSE/PacketMath.h"
262 #include "src/Core/arch/SSE/MathFunctions.h"
263 #include "src/Core/arch/SSE/Complex.h"
264 #elif defined EIGEN_VECTORIZE_ALTIVEC
265 #include "src/Core/arch/AltiVec/PacketMath.h"
266 #include "src/Core/arch/AltiVec/Complex.h"
267 #elif defined EIGEN_VECTORIZE_NEON
268 #include "src/Core/arch/NEON/PacketMath.h"
269 #include "src/Core/arch/NEON/Complex.h"
270 #endif
271
272 #include "src/Core/arch/Default/Settings.h"
273
274 #include "src/Core/Functors.h"
275 #include "src/Core/DenseCoeffsBase.h"
276 #include "src/Core/DenseBase.h"
277 #include "src/Core/MatrixBase.h"
278 #include "src/Core/EigenBase.h"
279
280 #ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874
281 // at least confirmed with Doxygen 1.5.5 and 1.5.6
282 #include "src/Core/Assign.h"
283 #endif
284
285 #include "src/Core/util/BlasUtil.h"
286 #include "src/Core/DenseStorage.h"
287 #include "src/Core/NestByValue.h"
288 #include "src/Core/ForceAlignedAccess.h"
289 #include "src/Core/ReturnByValue.h"
290 #include "src/Core/NoAlias.h"
291 #include "src/Core/PlainObjectBase.h"
292 #include "src/Core/Matrix.h"
293 #include "src/Core/Array.h"
294 #include "src/Core/CwiseBinaryOp.h"
295 #include "src/Core/CwiseUnaryOp.h"
296 #include "src/Core/CwiseNullaryOp.h"
297 #include "src/Core/CwiseUnaryView.h"
298 #include "src/Core/SelfCwiseBinaryOp.h"
299 #include "src/Core/Dot.h"
300 #include "src/Core/StableNorm.h"
301 #include "src/Core/MapBase.h"
302 #include "src/Core/Stride.h"
303 #include "src/Core/Map.h"
304 #include "src/Core/Block.h"
305 #include "src/Core/VectorBlock.h"
306 #include "src/Core/Transpose.h"
307 #include "src/Core/DiagonalMatrix.h"
308 #include "src/Core/Diagonal.h"
309 #include "src/Core/DiagonalProduct.h"
310 #include "src/Core/PermutationMatrix.h"
311 #include "src/Core/Transpositions.h"
312 #include "src/Core/Redux.h"
313 #include "src/Core/Visitor.h"
314 #include "src/Core/Fuzzy.h"
315 #include "src/Core/IO.h"
316 #include "src/Core/Swap.h"
317 #include "src/Core/CommaInitializer.h"
318 #include "src/Core/Flagged.h"
319 #include "src/Core/ProductBase.h"
320 #include "src/Core/Product.h"
321 #include "src/Core/TriangularMatrix.h"
322 #include "src/Core/SelfAdjointView.h"
323 #include "src/Core/SolveTriangular.h"
324 #include "src/Core/products/Parallelizer.h"
325 #include "src/Core/products/CoeffBasedProduct.h"
326 #include "src/Core/products/GeneralBlockPanelKernel.h"
327 #include "src/Core/products/GeneralMatrixVector.h"
328 #include "src/Core/products/GeneralMatrixMatrix.h"
329 #include "src/Core/products/GeneralMatrixMatrixTriangular.h"
330 #include "src/Core/products/SelfadjointMatrixVector.h"
331 #include "src/Core/products/SelfadjointMatrixMatrix.h"
332 #include "src/Core/products/SelfadjointProduct.h"
333 #include "src/Core/products/SelfadjointRank2Update.h"
334 #include "src/Core/products/TriangularMatrixVector.h"
335 #include "src/Core/products/TriangularMatrixMatrix.h"
336 #include "src/Core/products/TriangularSolverMatrix.h"
337 #include "src/Core/products/TriangularSolverVector.h"
338 #include "src/Core/BandMatrix.h"
339
340 #include "src/Core/BooleanRedux.h"
341 #include "src/Core/Select.h"
342 #include "src/Core/VectorwiseOp.h"
343 #include "src/Core/Random.h"
344 #include "src/Core/Replicate.h"
345 #include "src/Core/Reverse.h"
346 #include "src/Core/ArrayBase.h"
347 #include "src/Core/ArrayWrapper.h"
348
349 } // namespace Eigen
350
351 #include "src/Core/GlobalFunctions.h"
352
353 #include "src/Core/util/ReenableStupidWarnings.h"
354
355 #ifdef EIGEN2_SUPPORT
356 #include "Eigen2Support"
357 #endif
358
359 #endif // EIGEN_CORE_H
0 #include "Core"
1 #include "LU"
2 #include "Cholesky"
3 #include "QR"
4 #include "SVD"
5 #include "Geometry"
6 #include "Eigenvalues"
0 #include "Dense"
1 //#include "Sparse"
0 // This file is part of Eigen, a lightweight C++ template library
1 // for linear algebra.
2 //
3 // Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
4 //
5 // Eigen is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 3 of the License, or (at your option) any later version.
9 //
10 // Alternatively, you can redistribute it and/or
11 // modify it under the terms of the GNU General Public License as
12 // published by the Free Software Foundation; either version 2 of
13 // the License, or (at your option) any later version.
14 //
15 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
16 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License and a copy of the GNU General Public License along with
22 // Eigen. If not, see <http://www.gnu.org/licenses/>.
23
24 #ifndef EIGEN2SUPPORT_H
25 #define EIGEN2SUPPORT_H
26
27 #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H))
28 #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header
29 #endif
30
31 #include "src/Core/util/DisableStupidWarnings.h"
32
33 namespace Eigen {
34
35 /** \defgroup Eigen2Support_Module Eigen2 support module
36 * This module provides a couple of deprecated functions improving the compatibility with Eigen2.
37 *
38 * To use it, define EIGEN2_SUPPORT before including any Eigen header
39 * \code
40 * #define EIGEN2_SUPPORT
41 * \endcode
42 *
43 */
44
45 #include "src/Eigen2Support/Macros.h"
46 #include "src/Eigen2Support/Memory.h"
47 #include "src/Eigen2Support/Meta.h"
48 #include "src/Eigen2Support/Lazy.h"
49 #include "src/Eigen2Support/Cwise.h"
50 #include "src/Eigen2Support/CwiseOperators.h"
51 #include "src/Eigen2Support/TriangularSolver.h"
52 #include "src/Eigen2Support/Block.h"
53 #include "src/Eigen2Support/VectorBlock.h"
54 #include "src/Eigen2Support/Minor.h"
55 #include "src/Eigen2Support/MathFunctions.h"
56
57
58 } // namespace Eigen
59
60 #include "src/Core/util/ReenableStupidWarnings.h"
61
62 // Eigen2 used to include iostream
63 #include<iostream>
64
65 #define USING_PART_OF_NAMESPACE_EIGEN \
66 EIGEN_USING_MATRIX_TYPEDEFS \
67 using Eigen::Matrix; \
68 using Eigen::MatrixBase; \
69 using Eigen::ei_random; \
70 using Eigen::ei_real; \
71 using Eigen::ei_imag; \
72 using Eigen::ei_conj; \
73 using Eigen::ei_abs; \
74 using Eigen::ei_abs2; \
75 using Eigen::ei_sqrt; \
76 using Eigen::ei_exp; \
77 using Eigen::ei_log; \
78 using Eigen::ei_sin; \
79 using Eigen::ei_cos;
80
81 #endif // EIGEN2SUPPORT_H
0 #ifndef EIGEN_EIGENVALUES_MODULE_H
1 #define EIGEN_EIGENVALUES_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 #include "Cholesky"
8 #include "Jacobi"
9 #include "Householder"
10 #include "LU"
11
12 namespace Eigen {
13
14 /** \defgroup Eigenvalues_Module Eigenvalues module
15 *
16 *
17 *
18 * This module mainly provides various eigenvalue solvers.
19 * This module also provides some MatrixBase methods, including:
20 * - MatrixBase::eigenvalues(),
21 * - MatrixBase::operatorNorm()
22 *
23 * \code
24 * #include <Eigen/Eigenvalues>
25 * \endcode
26 */
27
28 #include "src/Eigenvalues/Tridiagonalization.h"
29 #include "src/Eigenvalues/RealSchur.h"
30 #include "src/Eigenvalues/EigenSolver.h"
31 #include "src/Eigenvalues/SelfAdjointEigenSolver.h"
32 #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h"
33 #include "src/Eigenvalues/HessenbergDecomposition.h"
34 #include "src/Eigenvalues/ComplexSchur.h"
35 #include "src/Eigenvalues/ComplexEigenSolver.h"
36 #include "src/Eigenvalues/MatrixBaseEigenvalues.h"
37
38 } // namespace Eigen
39
40 #include "src/Core/util/ReenableStupidWarnings.h"
41
42 #endif // EIGEN_EIGENVALUES_MODULE_H
43 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0 #ifndef EIGEN_GEOMETRY_MODULE_H
1 #define EIGEN_GEOMETRY_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 #include "SVD"
8 #include "LU"
9 #include <limits>
10
11 #ifndef M_PI
12 #define M_PI 3.14159265358979323846
13 #endif
14
15 namespace Eigen {
16
17 /** \defgroup Geometry_Module Geometry module
18 *
19 *
20 *
21 * This module provides support for:
22 * - fixed-size homogeneous transformations
23 * - translation, scaling, 2D and 3D rotations
24 * - quaternions
25 * - \ref MatrixBase::cross() "cross product"
26 * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation"
27 * - some linear components: parametrized-lines and hyperplanes
28 *
29 * \code
30 * #include <Eigen/Geometry>
31 * \endcode
32 */
33
34 #include "src/Geometry/OrthoMethods.h"
35 #include "src/Geometry/EulerAngles.h"
36
37 #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS
38 #include "src/Geometry/Homogeneous.h"
39 #include "src/Geometry/RotationBase.h"
40 #include "src/Geometry/Rotation2D.h"
41 #include "src/Geometry/Quaternion.h"
42 #include "src/Geometry/AngleAxis.h"
43 #include "src/Geometry/Transform.h"
44 #include "src/Geometry/Translation.h"
45 #include "src/Geometry/Scaling.h"
46 #include "src/Geometry/Hyperplane.h"
47 #include "src/Geometry/ParametrizedLine.h"
48 #include "src/Geometry/AlignedBox.h"
49 #include "src/Geometry/Umeyama.h"
50
51 #if defined EIGEN_VECTORIZE_SSE
52 #include "src/Geometry/arch/Geometry_SSE.h"
53 #endif
54 #endif
55
56 #ifdef EIGEN2_SUPPORT
57 #include "src/Eigen2Support/Geometry/All.h"
58 #endif
59
60 } // namespace Eigen
61
62 #include "src/Core/util/ReenableStupidWarnings.h"
63
64 #endif // EIGEN_GEOMETRY_MODULE_H
65 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
66
0 #ifndef EIGEN_HOUSEHOLDER_MODULE_H
1 #define EIGEN_HOUSEHOLDER_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 namespace Eigen {
8
9 /** \defgroup Householder_Module Householder module
10 * This module provides Householder transformations.
11 *
12 * \code
13 * #include <Eigen/Householder>
14 * \endcode
15 */
16
17 #include "src/Householder/Householder.h"
18 #include "src/Householder/HouseholderSequence.h"
19 #include "src/Householder/BlockHouseholder.h"
20
21 } // namespace Eigen
22
23 #include "src/Core/util/ReenableStupidWarnings.h"
24
25 #endif // EIGEN_HOUSEHOLDER_MODULE_H
26 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0 #ifndef EIGEN_JACOBI_MODULE_H
1 #define EIGEN_JACOBI_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 namespace Eigen {
8
9 /** \defgroup Jacobi_Module Jacobi module
10 * This module provides Jacobi and Givens rotations.
11 *
12 * \code
13 * #include <Eigen/Jacobi>
14 * \endcode
15 *
16 * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation:
17 * - MatrixBase::applyOnTheLeft()
18 * - MatrixBase::applyOnTheRight().
19 */
20
21 #include "src/Jacobi/Jacobi.h"
22
23 } // namespace Eigen
24
25 #include "src/Core/util/ReenableStupidWarnings.h"
26
27 #endif // EIGEN_JACOBI_MODULE_H
28 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
29
0 #ifndef EIGEN_LU_MODULE_H
1 #define EIGEN_LU_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 namespace Eigen {
8
9 /** \defgroup LU_Module LU module
10 * This module includes %LU decomposition and related notions such as matrix inversion and determinant.
11 * This module defines the following MatrixBase methods:
12 * - MatrixBase::inverse()
13 * - MatrixBase::determinant()
14 *
15 * \code
16 * #include <Eigen/LU>
17 * \endcode
18 */
19
20 #include "src/misc/Solve.h"
21 #include "src/misc/Kernel.h"
22 #include "src/misc/Image.h"
23 #include "src/LU/FullPivLU.h"
24 #include "src/LU/PartialPivLU.h"
25 #include "src/LU/Determinant.h"
26 #include "src/LU/Inverse.h"
27
28 #if defined EIGEN_VECTORIZE_SSE
29 #include "src/LU/arch/Inverse_SSE.h"
30 #endif
31
32 #ifdef EIGEN2_SUPPORT
33 #include "src/Eigen2Support/LU.h"
34 #endif
35
36 } // namespace Eigen
37
38 #include "src/Core/util/ReenableStupidWarnings.h"
39
40 #endif // EIGEN_LU_MODULE_H
41 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0 #ifndef EIGEN_REGRESSION_MODULE_H
1 #define EIGEN_REGRESSION_MODULE_H
2
3 #ifndef EIGEN2_SUPPORT
4 #error LeastSquares is only available in Eigen2 support mode (define EIGEN2_SUPPORT)
5 #endif
6
7 // exclude from normal eigen3-only documentation
8 #ifdef EIGEN2_SUPPORT
9
10 #include "Core"
11
12 #include "src/Core/util/DisableStupidWarnings.h"
13
14 #include "Eigenvalues"
15 #include "Geometry"
16
17 namespace Eigen {
18
19 /** \defgroup LeastSquares_Module LeastSquares module
20 * This module provides linear regression and related features.
21 *
22 * \code
23 * #include <Eigen/LeastSquares>
24 * \endcode
25 */
26
27 #include "src/Eigen2Support/LeastSquares.h"
28
29 } // namespace Eigen
30
31 #include "src/Core/util/ReenableStupidWarnings.h"
32
33 #endif // EIGEN2_SUPPORT
34
35 #endif // EIGEN_REGRESSION_MODULE_H
0 #ifndef EIGEN_QR_MODULE_H
1 #define EIGEN_QR_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 #include "Cholesky"
8 #include "Jacobi"
9 #include "Householder"
10
11 namespace Eigen {
12
13 /** \defgroup QR_Module QR module
14 *
15 *
16 *
17 * This module provides various QR decompositions
18 * This module also provides some MatrixBase methods, including:
19 * - MatrixBase::qr(),
20 *
21 * \code
22 * #include <Eigen/QR>
23 * \endcode
24 */
25
26 #include "src/misc/Solve.h"
27 #include "src/QR/HouseholderQR.h"
28 #include "src/QR/FullPivHouseholderQR.h"
29 #include "src/QR/ColPivHouseholderQR.h"
30
31 #ifdef EIGEN2_SUPPORT
32 #include "src/Eigen2Support/QR.h"
33 #endif
34
35 } // namespace Eigen
36
37 #include "src/Core/util/ReenableStupidWarnings.h"
38
39 #ifdef EIGEN2_SUPPORT
40 #include "Eigenvalues"
41 #endif
42
43 #endif // EIGEN_QR_MODULE_H
44 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0
1 #ifndef EIGEN_QTMALLOC_MODULE_H
2 #define EIGEN_QTMALLOC_MODULE_H
3
4 #include "Core"
5
6 #if (!EIGEN_MALLOC_ALREADY_ALIGNED)
7
8 #include "src/Core/util/DisableStupidWarnings.h"
9
10 void *qMalloc(size_t size)
11 {
12 return Eigen::internal::aligned_malloc(size);
13 }
14
15 void qFree(void *ptr)
16 {
17 Eigen::internal::aligned_free(ptr);
18 }
19
20 void *qRealloc(void *ptr, size_t size)
21 {
22 void* newPtr = Eigen::internal::aligned_malloc(size);
23 memcpy(newPtr, ptr, size);
24 Eigen::internal::aligned_free(ptr);
25 return newPtr;
26 }
27
28 #include "src/Core/util/ReenableStupidWarnings.h"
29
30 #endif
31
32 #endif // EIGEN_QTMALLOC_MODULE_H
33 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0 #ifndef EIGEN_SVD_MODULE_H
1 #define EIGEN_SVD_MODULE_H
2
3 #include "QR"
4 #include "Householder"
5 #include "Jacobi"
6
7 #include "src/Core/util/DisableStupidWarnings.h"
8
9 namespace Eigen {
10
11 /** \defgroup SVD_Module SVD module
12 *
13 *
14 *
15 * This module provides SVD decomposition for matrices (both real and complex).
16 * This decomposition is accessible via the following MatrixBase method:
17 * - MatrixBase::jacobiSvd()
18 *
19 * \code
20 * #include <Eigen/SVD>
21 * \endcode
22 */
23
24 #include "src/misc/Solve.h"
25 #include "src/SVD/JacobiSVD.h"
26 #include "src/SVD/UpperBidiagonalization.h"
27
28 #ifdef EIGEN2_SUPPORT
29 #include "src/Eigen2Support/SVD.h"
30 #endif
31
32 } // namespace Eigen
33
34 #include "src/Core/util/ReenableStupidWarnings.h"
35
36 #endif // EIGEN_SVD_MODULE_H
37 /* vim: set filetype=cpp et sw=2 ts=2 ai: */
0 #ifndef EIGEN_SPARSE_MODULE_H
1 #define EIGEN_SPARSE_MODULE_H
2
3 #include "Core"
4
5 #include "src/Core/util/DisableStupidWarnings.h"
6
7 #include <vector>
8 #include <map>
9 #include <cstdlib>
10 #include <cstring>
11 #include <algorithm>
12
13 #ifdef EIGEN2_SUPPORT
14 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
15 #endif
16
17 #ifndef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
18 #error The sparse module API is not stable yet. To use it anyway, please define the EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET preprocessor token.
19 #endif
20
21 namespace Eigen {
22
23 /** \defgroup Sparse_Module Sparse module
24 *
25 *
26 *
27 * See the \ref TutorialSparse "Sparse tutorial"
28 *
29 * \code
30 * #include <Eigen/Sparse>
31 * \endcode
32 */
33
34 /** The type used to identify a general sparse storage. */
35 struct Sparse {};
36
37 #include "src/Sparse/SparseUtil.h"
38 #include "src/Sparse/SparseMatrixBase.h"
39 #include "src/Sparse/CompressedStorage.h"
40 #include "src/Sparse/AmbiVector.h"
41 #include "src/Sparse/SparseMatrix.h"
42 #include "src/Sparse/DynamicSparseMatrix.h"
43 #include "src/Sparse/MappedSparseMatrix.h"
44 #include "src/Sparse/SparseVector.h"
45 #include "src/Sparse/CoreIterators.h"
46 #include "src/Sparse/SparseBlock.h"
47 #include "src/Sparse/SparseTranspose.h"
48 #include "src/Sparse/SparseCwiseUnaryOp.h"
49 #include "src/Sparse/SparseCwiseBinaryOp.h"
50 #include "src/Sparse/SparseDot.h"
51 #include "src/Sparse/SparseAssign.h"
52 #include "src/Sparse/SparseRedux.h"
53 #include "src/Sparse/SparseFuzzy.h"
54 #include "src/Sparse/SparseProduct.h"
55 #include "src/Sparse/SparseSparseProduct.h"
56 #include "src/Sparse/SparseDenseProduct.h"
57 #include "src/Sparse/SparseDiagonalProduct.h"
58 #include "src/Sparse/SparseTriangularView.h"
59 #include "src/Sparse/SparseSelfAdjointView.h"
60 #include "src/Sparse/TriangularSolver.h"
61 #include "src/Sparse/SparseView.h"
62
63 } // namespace Eigen
64
65 #include "src/Core/util/ReenableStupidWarnings.h"
66
67 #endif // EIGEN_SPARSE_MODULE_H
68
0 // This file is part of Eigen, a lightweight C++ template library
1 // for linear algebra.
2 //
3 // Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
4 // Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>
5 //
6 // Eigen is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 3 of the License, or (at your option) any later version.
10 //
11 // Alternatively, you can redistribute it and/or
12 // modify it under the terms of the GNU General Public License as
13 // published by the Free Software Foundation; either version 2 of
14 // the License, or (at your option) any later version.
15 //
16 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public
22 // License and a copy of the GNU General Public License along with
23 // Eigen. If not, see <http://www.gnu.org/licenses/>.
24
25 #ifndef EIGEN_STDDEQUE_MODULE_H
26 #define EIGEN_STDDEQUE_MODULE_H
27
28 #include "Core"
29 #include <deque>
30
31 #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */
32
33 #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...)
34
35 #else
36
37 #include "src/StlSupport/StdDeque.h"
38
39 #endif
40
41 #endif // EIGEN_STDDEQUE_MODULE_H
0 // This file is part of Eigen, a lightweight C++ template library
1 // for linear algebra.
2 //
3 // Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>
4 //
5 // Eigen is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 3 of the License, or (at your option) any later version.
9 //
10 // Alternatively, you can redistribute it and/or
11 // modify it under the terms of the GNU General Public License as
12 // published by the Free Software Foundation; either version 2 of
13 // the License, or (at your option) any later version.
14 //
15 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
16 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
18 // GNU General Public License for more details.
19 //