Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-10-20 13:50:24 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-10-20 13:50:24 +0400
commitcf29a237230abd4547d4435d5a5ab4cdcd46b332 (patch)
tree87afe174904a65e5b82fe77d9d603f3cdf7d1b22 /extern
parent2c455098056b4d9ce17dede92adb620f0ab0f3c9 (diff)
Use Eigen2 2.0 head version rather then 2.0.6. It contains various bug fix.
Diffstat (limited to 'extern')
-rw-r--r--extern/Eigen2/Eigen/src/Array/Functors.h4
-rw-r--r--extern/Eigen2/Eigen/src/Array/PartialRedux.h5
-rw-r--r--extern/Eigen2/Eigen/src/Core/CommaInitializer.h3
-rw-r--r--extern/Eigen2/Eigen/src/Core/Cwise.h3
-rw-r--r--extern/Eigen2/Eigen/src/Core/Flagged.h3
-rw-r--r--extern/Eigen2/Eigen/src/Core/Functors.h10
-rw-r--r--extern/Eigen2/Eigen/src/Core/Matrix.h4
-rw-r--r--extern/Eigen2/Eigen/src/Core/NestByValue.h3
-rw-r--r--extern/Eigen2/Eigen/src/Core/Part.h4
-rw-r--r--extern/Eigen2/Eigen/src/Core/Swap.h3
-rw-r--r--extern/Eigen2/Eigen/src/Core/util/Memory.h49
-rw-r--r--extern/Eigen2/Eigen/src/SVD/SVD.h1
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/AmbiVector.h10
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h4
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseBlock.h5
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseCwise.h3
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h11
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h3
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h2
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseFlagged.h7
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h11
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseTranspose.h7
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseVector.h3
-rwxr-xr-xextern/Eigen2/eigen-update.sh2
24 files changed, 135 insertions, 25 deletions
diff --git a/extern/Eigen2/Eigen/src/Array/Functors.h b/extern/Eigen2/Eigen/src/Array/Functors.h
index 0aae7fd2c40..c2c325a788e 100644
--- a/extern/Eigen2/Eigen/src/Array/Functors.h
+++ b/extern/Eigen2/Eigen/src/Array/Functors.h
@@ -43,6 +43,8 @@ struct ei_scalar_add_op {
inline const PacketScalar packetOp(const PacketScalar& a) const
{ return ei_padd(a, ei_pset1(m_other)); }
const Scalar m_other;
+private:
+ ei_scalar_add_op& operator=(const ei_scalar_add_op&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_add_op<Scalar> >
@@ -138,6 +140,8 @@ struct ei_scalar_pow_op {
inline ei_scalar_pow_op(const Scalar& exponent) : m_exponent(exponent) {}
inline Scalar operator() (const Scalar& a) const { return ei_pow(a, m_exponent); }
const Scalar m_exponent;
+private:
+ ei_scalar_pow_op& operator=(const ei_scalar_pow_op&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_pow_op<Scalar> >
diff --git a/extern/Eigen2/Eigen/src/Array/PartialRedux.h b/extern/Eigen2/Eigen/src/Array/PartialRedux.h
index b1e8fd4babd..3a052ca8a3d 100644
--- a/extern/Eigen2/Eigen/src/Array/PartialRedux.h
+++ b/extern/Eigen2/Eigen/src/Array/PartialRedux.h
@@ -133,6 +133,8 @@ struct ei_member_redux {
inline result_type operator()(const MatrixBase<Derived>& mat) const
{ return mat.redux(m_functor); }
const BinaryOp m_functor;
+private:
+ ei_member_redux& operator=(const ei_member_redux&);
};
/** \array_module \ingroup Array
@@ -290,6 +292,9 @@ template<typename ExpressionType, int Direction> class PartialRedux
protected:
ExpressionTypeNested m_matrix;
+
+ private:
+ PartialRedux& operator=(const PartialRedux&);
};
/** \array_module
diff --git a/extern/Eigen2/Eigen/src/Core/CommaInitializer.h b/extern/Eigen2/Eigen/src/Core/CommaInitializer.h
index ed28e0ca371..f66cbd6d5e1 100644
--- a/extern/Eigen2/Eigen/src/Core/CommaInitializer.h
+++ b/extern/Eigen2/Eigen/src/Core/CommaInitializer.h
@@ -116,6 +116,9 @@ struct CommaInitializer
int m_row; // current row id
int m_col; // current col id
int m_currentBlockRows; // current block height
+
+private:
+ CommaInitializer& operator=(const CommaInitializer&);
};
/** \anchor MatrixBaseCommaInitRef
diff --git a/extern/Eigen2/Eigen/src/Core/Cwise.h b/extern/Eigen2/Eigen/src/Core/Cwise.h
index 0e92dce4e12..4dc9d514b04 100644
--- a/extern/Eigen2/Eigen/src/Core/Cwise.h
+++ b/extern/Eigen2/Eigen/src/Core/Cwise.h
@@ -178,6 +178,9 @@ template<typename ExpressionType> class Cwise
protected:
ExpressionTypeNested m_matrix;
+
+ private:
+ Cwise& operator=(const Cwise&);
};
/** \returns a Cwise wrapper of *this providing additional coefficient-wise operations
diff --git a/extern/Eigen2/Eigen/src/Core/Flagged.h b/extern/Eigen2/Eigen/src/Core/Flagged.h
index ce50246cb67..e3d25341d9e 100644
--- a/extern/Eigen2/Eigen/src/Core/Flagged.h
+++ b/extern/Eigen2/Eigen/src/Core/Flagged.h
@@ -109,6 +109,9 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
protected:
ExpressionTypeNested m_matrix;
+
+private:
+ Flagged& operator=(const Flagged&);
};
/** \returns an expression of *this with added flags
diff --git a/extern/Eigen2/Eigen/src/Core/Functors.h b/extern/Eigen2/Eigen/src/Core/Functors.h
index c8ca3dac1cf..969cad78d8f 100644
--- a/extern/Eigen2/Eigen/src/Core/Functors.h
+++ b/extern/Eigen2/Eigen/src/Core/Functors.h
@@ -279,6 +279,8 @@ struct ei_scalar_multiple_op {
EIGEN_STRONG_INLINE const PacketScalar packetOp(const PacketScalar& a) const
{ return ei_pmul(a, ei_pset1(m_other)); }
const Scalar m_other;
+private:
+ ei_scalar_multiple_op& operator=(const ei_scalar_multiple_op&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_multiple_op<Scalar> >
@@ -294,6 +296,8 @@ struct ei_scalar_quotient1_impl {
EIGEN_STRONG_INLINE const PacketScalar packetOp(const PacketScalar& a) const
{ return ei_pmul(a, ei_pset1(m_other)); }
const Scalar m_other;
+private:
+ ei_scalar_quotient1_impl& operator=(const ei_scalar_quotient1_impl&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_quotient1_impl<Scalar,true> >
@@ -306,6 +310,8 @@ struct ei_scalar_quotient1_impl<Scalar,false> {
EIGEN_STRONG_INLINE ei_scalar_quotient1_impl(const Scalar& other) : m_other(other) {}
EIGEN_STRONG_INLINE Scalar operator() (const Scalar& a) const { return a / m_other; }
const Scalar m_other;
+private:
+ ei_scalar_quotient1_impl& operator=(const ei_scalar_quotient1_impl&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_quotient1_impl<Scalar,false> >
@@ -323,6 +329,8 @@ template<typename Scalar>
struct ei_scalar_quotient1_op : ei_scalar_quotient1_impl<Scalar, NumTraits<Scalar>::HasFloatingPoint > {
EIGEN_STRONG_INLINE ei_scalar_quotient1_op(const Scalar& other)
: ei_scalar_quotient1_impl<Scalar, NumTraits<Scalar>::HasFloatingPoint >(other) {}
+private:
+ ei_scalar_quotient1_op& operator=(const ei_scalar_quotient1_op&);
};
// nullary functors
@@ -335,6 +343,8 @@ struct ei_scalar_constant_op {
EIGEN_STRONG_INLINE const Scalar operator() (int, int = 0) const { return m_other; }
EIGEN_STRONG_INLINE const PacketScalar packetOp() const { return ei_pset1(m_other); }
const Scalar m_other;
+private:
+ ei_scalar_constant_op& operator=(const ei_scalar_constant_op&);
};
template<typename Scalar>
struct ei_functor_traits<ei_scalar_constant_op<Scalar> >
diff --git a/extern/Eigen2/Eigen/src/Core/Matrix.h b/extern/Eigen2/Eigen/src/Core/Matrix.h
index ffd16d37606..22090c777da 100644
--- a/extern/Eigen2/Eigen/src/Core/Matrix.h
+++ b/extern/Eigen2/Eigen/src/Core/Matrix.h
@@ -505,7 +505,9 @@ class Matrix
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix& _set(const MatrixBase<OtherDerived>& other)
{
- _set_selector(other.derived(), typename ei_meta_if<bool(int(OtherDerived::Flags) & EvalBeforeAssigningBit), ei_meta_true, ei_meta_false>::ret());
+ // this enum introduced to fix compilation with gcc 3.3
+ enum { cond = int(OtherDerived::Flags) & EvalBeforeAssigningBit };
+ _set_selector(other.derived(), typename ei_meta_if<bool(cond), ei_meta_true, ei_meta_false>::ret());
return *this;
}
diff --git a/extern/Eigen2/Eigen/src/Core/NestByValue.h b/extern/Eigen2/Eigen/src/Core/NestByValue.h
index da79315bffe..2a14ab1f156 100644
--- a/extern/Eigen2/Eigen/src/Core/NestByValue.h
+++ b/extern/Eigen2/Eigen/src/Core/NestByValue.h
@@ -100,6 +100,9 @@ template<typename ExpressionType> class NestByValue
protected:
const ExpressionType m_expression;
+
+ private:
+ NestByValue& operator=(const NestByValue&);
};
/** \returns an expression of the temporary version of *this.
diff --git a/extern/Eigen2/Eigen/src/Core/Part.h b/extern/Eigen2/Eigen/src/Core/Part.h
index 9c273f249ec..96229f43b68 100644
--- a/extern/Eigen2/Eigen/src/Core/Part.h
+++ b/extern/Eigen2/Eigen/src/Core/Part.h
@@ -124,8 +124,10 @@ template<typename MatrixType, unsigned int Mode> class Part
}
protected:
-
const typename MatrixType::Nested m_matrix;
+
+ private:
+ Part& operator=(const Part&);
};
/** \nonstableyet
diff --git a/extern/Eigen2/Eigen/src/Core/Swap.h b/extern/Eigen2/Eigen/src/Core/Swap.h
index 77d562cd3ac..9aaac652fd8 100644
--- a/extern/Eigen2/Eigen/src/Core/Swap.h
+++ b/extern/Eigen2/Eigen/src/Core/Swap.h
@@ -117,6 +117,9 @@ template<typename ExpressionType> class SwapWrapper
protected:
ExpressionType& m_expression;
+
+ private:
+ SwapWrapper& operator=(const SwapWrapper&);
};
/** swaps *this with the expression \a other.
diff --git a/extern/Eigen2/Eigen/src/Core/util/Memory.h b/extern/Eigen2/Eigen/src/Core/util/Memory.h
index 09ad39d5be9..0a43e7f7bf2 100644
--- a/extern/Eigen2/Eigen/src/Core/util/Memory.h
+++ b/extern/Eigen2/Eigen/src/Core/util/Memory.h
@@ -1,5 +1,5 @@
// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra. Eigen itself is part of the KDE project.
+// for linear algebra.
//
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
// Copyright (C) 2008-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
@@ -27,7 +27,17 @@
#ifndef EIGEN_MEMORY_H
#define EIGEN_MEMORY_H
-#if defined(__APPLE__) || defined(_WIN64)
+// FreeBSD 6 seems to have 16-byte aligned malloc
+// See http://svn.freebsd.org/viewvc/base/stable/6/lib/libc/stdlib/malloc.c?view=markup
+// FreeBSD 7 seems to have 16-byte aligned malloc except on ARM and MIPS architectures
+// See http://svn.freebsd.org/viewvc/base/stable/7/lib/libc/stdlib/malloc.c?view=markup
+#if defined(__FreeBSD__) && !defined(__arm__) && !defined(__mips__)
+#define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED 1
+#else
+#define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED 0
+#endif
+
+#if defined(__APPLE__) || defined(_WIN64) || EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED
#define EIGEN_MALLOC_ALREADY_ALIGNED 1
#else
#define EIGEN_MALLOC_ALREADY_ALIGNED 0
@@ -65,7 +75,7 @@ inline void ei_handmade_aligned_free(void *ptr)
}
/** \internal allocates \a size bytes. The returned pointer is guaranteed to have 16 bytes alignment.
- * On allocation error, the returned pointer is undefined, but if exceptions are enabled then a std::bad_alloc is thrown.
+ * On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.
*/
inline void* ei_aligned_malloc(size_t size)
{
@@ -96,7 +106,7 @@ inline void* ei_aligned_malloc(size_t size)
}
/** allocates \a size bytes. If Align is true, then the returned ptr is 16-byte-aligned.
- * On allocation error, the returned pointer is undefined, but if exceptions are enabled then a std::bad_alloc is thrown.
+ * On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.
*/
template<bool Align> inline void* ei_conditional_aligned_malloc(size_t size)
{
@@ -116,20 +126,29 @@ template<> inline void* ei_conditional_aligned_malloc<false>(size_t size)
return result;
}
+/** \internal construct the elements of an array.
+ * The \a size parameter tells on how many objects to call the constructor of T.
+ */
+template<typename T> inline T* ei_construct_elements_of_array(T *ptr, size_t size)
+{
+ for (size_t i=0; i < size; ++i) ::new (ptr + i) T;
+ return ptr;
+}
+
/** allocates \a size objects of type T. The returned pointer is guaranteed to have 16 bytes alignment.
* On allocation error, the returned pointer is undefined, but if exceptions are enabled then a std::bad_alloc is thrown.
* The default constructor of T is called.
*/
template<typename T> inline T* ei_aligned_new(size_t size)
{
- void *void_result = ei_aligned_malloc(sizeof(T)*size);
- return ::new(void_result) T[size];
+ T *result = reinterpret_cast<T*>(ei_aligned_malloc(sizeof(T)*size));
+ return ei_construct_elements_of_array(result, size);
}
template<typename T, bool Align> inline T* ei_conditional_aligned_new(size_t size)
{
- void *void_result = ei_conditional_aligned_malloc<Align>(sizeof(T)*size);
- return ::new(void_result) T[size];
+ T *result = reinterpret_cast<T*>(ei_conditional_aligned_malloc<Align>(sizeof(T)*size));
+ return ei_construct_elements_of_array(result, size);
}
/** \internal free memory allocated with ei_aligned_malloc
@@ -163,10 +182,10 @@ template<> inline void ei_conditional_aligned_free<false>(void *ptr)
free(ptr);
}
-/** \internal delete the elements of an array.
+/** \internal destruct the elements of an array.
* The \a size parameters tells on how many objects to call the destructor of T.
*/
-template<typename T> inline void ei_delete_elements_of_array(T *ptr, size_t size)
+template<typename T> inline void ei_destruct_elements_of_array(T *ptr, size_t size)
{
// always destruct an array starting from the end.
while(size) ptr[--size].~T();
@@ -177,7 +196,7 @@ template<typename T> inline void ei_delete_elements_of_array(T *ptr, size_t size
*/
template<typename T> inline void ei_aligned_delete(T *ptr, size_t size)
{
- ei_delete_elements_of_array<T>(ptr, size);
+ ei_destruct_elements_of_array<T>(ptr, size);
ei_aligned_free(ptr);
}
@@ -186,7 +205,7 @@ template<typename T> inline void ei_aligned_delete(T *ptr, size_t size)
*/
template<typename T, bool Align> inline void ei_conditional_aligned_delete(T *ptr, size_t size)
{
- ei_delete_elements_of_array<T>(ptr, size);
+ ei_destruct_elements_of_array<T>(ptr, size);
ei_conditional_aligned_free<Align>(ptr);
}
@@ -225,8 +244,8 @@ inline static int ei_alignmentOffset(const Scalar* ptr, int maxOffset)
#define ei_aligned_stack_free(PTR,SIZE) ei_aligned_free(PTR)
#endif
-#define ei_aligned_stack_new(TYPE,SIZE) ::new(ei_aligned_stack_alloc(sizeof(TYPE)*SIZE)) TYPE[SIZE]
-#define ei_aligned_stack_delete(TYPE,PTR,SIZE) do {ei_delete_elements_of_array<TYPE>(PTR, SIZE); \
+#define ei_aligned_stack_new(TYPE,SIZE) ei_construct_elements_of_array(reinterpret_cast<TYPE*>(ei_aligned_stack_alloc(sizeof(TYPE)*SIZE)), SIZE)
+#define ei_aligned_stack_delete(TYPE,PTR,SIZE) do {ei_destruct_elements_of_array<TYPE>(PTR, SIZE); \
ei_aligned_stack_free(PTR,sizeof(TYPE)*SIZE);} while(0)
@@ -244,7 +263,7 @@ inline static int ei_alignmentOffset(const Scalar* ptr, int maxOffset)
return Eigen::ei_conditional_aligned_malloc<NeedsToAlign>(size); \
}
#endif
-
+
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \
void *operator new(size_t size) { \
return Eigen::ei_conditional_aligned_malloc<NeedsToAlign>(size); \
diff --git a/extern/Eigen2/Eigen/src/SVD/SVD.h b/extern/Eigen2/Eigen/src/SVD/SVD.h
index 0a52acf3d5b..d117c158397 100644
--- a/extern/Eigen2/Eigen/src/SVD/SVD.h
+++ b/extern/Eigen2/Eigen/src/SVD/SVD.h
@@ -107,6 +107,7 @@ void SVD<MatrixType>::compute(const MatrixType& matrix)
const int m = matrix.rows();
const int n = matrix.cols();
const int nu = std::min(m,n);
+ ei_assert(m>=n && "In Eigen 2.0, SVD only works for MxN matrices with M>=N. Sorry!");
m_matU.resize(m, nu);
m_matU.setZero();
diff --git a/extern/Eigen2/Eigen/src/Sparse/AmbiVector.h b/extern/Eigen2/Eigen/src/Sparse/AmbiVector.h
index 75001a2fa25..f279e80f00a 100644
--- a/extern/Eigen2/Eigen/src/Sparse/AmbiVector.h
+++ b/extern/Eigen2/Eigen/src/Sparse/AmbiVector.h
@@ -99,6 +99,8 @@ template<typename _Scalar> class AmbiVector
allocSize = allocSize/sizeof(Scalar) + (allocSize%sizeof(Scalar)>0?1:0);
Scalar* newBuffer = new Scalar[allocSize];
memcpy(newBuffer, m_buffer, copyElements * sizeof(ListEl));
+ delete[] m_buffer;
+ m_buffer = newBuffer;
}
protected:
@@ -238,8 +240,11 @@ Scalar& AmbiVector<Scalar>::coeffRef(int i)
else
{
if (m_llSize>=m_allocatedElements)
+ {
reallocateSparse();
- ei_internal_assert(m_llSize<m_size && "internal error: overflow in sparse mode");
+ llElements = reinterpret_cast<ListEl*>(m_buffer);
+ }
+ ei_internal_assert(m_llSize<m_allocatedElements && "internal error: overflow in sparse mode");
// let's insert a new coefficient
ListEl& el = llElements[m_llSize];
el.value = Scalar(0);
@@ -365,6 +370,9 @@ class AmbiVector<_Scalar>::Iterator
int m_cachedIndex; // current coordinate
Scalar m_cachedValue; // current value
bool m_isDense; // mode of the vector
+
+ private:
+ Iterator& operator=(const Iterator&);
};
diff --git a/extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h b/extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h
index 7119a84bd51..01f97cd6d94 100644
--- a/extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h
+++ b/extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h
@@ -289,9 +289,11 @@ class DynamicSparseMatrix<Scalar,_Flags>::InnerIterator : public SparseVector<Sc
inline int row() const { return IsRowMajor ? m_outer : Base::index(); }
inline int col() const { return IsRowMajor ? Base::index() : m_outer; }
-
protected:
const int m_outer;
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
#endif // EIGEN_DYNAMIC_SPARSEMATRIX_H
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseBlock.h b/extern/Eigen2/Eigen/src/Sparse/SparseBlock.h
index c39066676b6..ae77a77879b 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseBlock.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseBlock.h
@@ -53,6 +53,9 @@ class SparseInnerVectorSet : ei_no_assignment_operator,
inline InnerIterator(const SparseInnerVectorSet& xpr, int outer)
: MatrixType::InnerIterator(xpr.m_matrix, xpr.m_outerStart + outer)
{}
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
inline SparseInnerVectorSet(const MatrixType& matrix, int outerStart, int outerSize)
@@ -110,6 +113,8 @@ class SparseInnerVectorSet<DynamicSparseMatrix<_Scalar, _Options>, Size>
inline InnerIterator(const SparseInnerVectorSet& xpr, int outer)
: MatrixType::InnerIterator(xpr.m_matrix, xpr.m_outerStart + outer)
{}
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
inline SparseInnerVectorSet(const MatrixType& matrix, int outerStart, int outerSize)
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseCwise.h b/extern/Eigen2/Eigen/src/Sparse/SparseCwise.h
index 2206883cc76..ac285ec1aa3 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseCwise.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseCwise.h
@@ -156,6 +156,9 @@ template<typename ExpressionType> class SparseCwise
protected:
ExpressionTypeNested m_matrix;
+
+ private:
+ SparseCwise& operator=(const SparseCwise&);
};
template<typename Derived>
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h b/extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h
index d19970efcb1..da9746e2099 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h
@@ -126,6 +126,8 @@ class SparseCwiseBinaryOp<BinaryOp,Lhs,Rhs>::InnerIterator
EIGEN_STRONG_INLINE InnerIterator(const SparseCwiseBinaryOp& binOp, int outer)
: Base(binOp,outer)
{}
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
/***************************************************************************
@@ -197,6 +199,9 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<BinaryOp, Lhs, Rhs, Deri
const BinaryOp& m_functor;
Scalar m_value;
int m_id;
+
+ private:
+ ei_sparse_cwise_binary_op_inner_iterator_selector& operator=(const ei_sparse_cwise_binary_op_inner_iterator_selector&);
};
// sparse - sparse (product)
@@ -250,6 +255,9 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<ei_scalar_product_op<T>,
LhsIterator m_lhsIter;
RhsIterator m_rhsIter;
const BinaryFunc& m_functor;
+
+ private:
+ ei_sparse_cwise_binary_op_inner_iterator_selector& operator=(const ei_sparse_cwise_binary_op_inner_iterator_selector&);
};
// sparse - dense (product)
@@ -290,6 +298,9 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<ei_scalar_product_op<T>,
LhsIterator m_lhsIter;
const BinaryFunc m_functor;
const int m_outer;
+
+ private:
+ ei_sparse_cwise_binary_op_inner_iterator_selector& operator=(const ei_sparse_cwise_binary_op_inner_iterator_selector&);
};
// sparse - dense (product)
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h b/extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h
index b11c0f8a377..2ed7a15579f 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h
@@ -90,6 +90,9 @@ class SparseCwiseUnaryOp<UnaryOp,MatrixType>::InnerIterator
protected:
MatrixTypeIterator m_iter;
const UnaryOp m_functor;
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
template<typename Derived>
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h b/extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h
index 932daf220b9..9b7432a8216 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h
@@ -120,6 +120,8 @@ class ei_sparse_diagonal_product_inner_iterator_selector
const SparseDiagonalProductType& expr, int outer)
: Base(expr.rhs().innerVector(outer) .cwise()* expr.lhs().diagonal(), 0)
{}
+ private:
+ ei_sparse_diagonal_product_inner_iterator_selector& operator=(const ei_sparse_diagonal_product_inner_iterator_selector&);
};
template<typename Lhs, typename Rhs, typename SparseDiagonalProductType>
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseFlagged.h b/extern/Eigen2/Eigen/src/Sparse/SparseFlagged.h
index c47e162f538..315ec4af39f 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseFlagged.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseFlagged.h
@@ -64,16 +64,21 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
protected:
ExpressionTypeNested m_matrix;
+
+ private:
+ SparseFlagged& operator=(const SparseFlagged&);
};
template<typename ExpressionType, unsigned int Added, unsigned int Removed>
class SparseFlagged<ExpressionType,Added,Removed>::InnerIterator : public ExpressionType::InnerIterator
{
public:
-
EIGEN_STRONG_INLINE InnerIterator(const SparseFlagged& xpr, int outer)
: ExpressionType::InnerIterator(xpr.m_matrix, outer)
{}
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
template<typename ExpressionType, unsigned int Added, unsigned int Removed>
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h b/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
index 3f09596bc64..65c609686d2 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
@@ -259,19 +259,21 @@ class SparseMatrix
m_data.resize(k,0);
}
+ /** Resizes the matrix to a \a rows x \a cols matrix and initializes it to zero
+ * \sa resizeNonZeros(int), reserve(), setZero()
+ */
void resize(int rows, int cols)
{
-// std::cerr << this << " resize " << rows << "x" << cols << "\n";
const int outerSize = IsRowMajor ? rows : cols;
m_innerSize = IsRowMajor ? cols : rows;
m_data.clear();
- if (m_outerSize != outerSize)
+ if (m_outerSize != outerSize || m_outerSize==0)
{
delete[] m_outerIndex;
m_outerIndex = new int [outerSize+1];
m_outerSize = outerSize;
- memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(int));
}
+ memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(int));
}
void resizeNonZeros(int size)
{
@@ -442,6 +444,9 @@ class SparseMatrix<Scalar,_Flags>::InnerIterator
int m_id;
const int m_start;
const int m_end;
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
#endif // EIGEN_SPARSEMATRIX_H
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseTranspose.h b/extern/Eigen2/Eigen/src/Sparse/SparseTranspose.h
index 89a14d70707..7386294e4d4 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseTranspose.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseTranspose.h
@@ -62,15 +62,20 @@ template<typename MatrixType> class SparseTranspose
protected:
const typename MatrixType::Nested m_matrix;
+
+ private:
+ SparseTranspose& operator=(const SparseTranspose&);
};
template<typename MatrixType> class SparseTranspose<MatrixType>::InnerIterator : public MatrixType::InnerIterator
{
public:
-
EIGEN_STRONG_INLINE InnerIterator(const SparseTranspose& trans, int outer)
: MatrixType::InnerIterator(trans.m_matrix, outer)
{}
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
template<typename MatrixType> class SparseTranspose<MatrixType>::ReverseInnerIterator : public MatrixType::ReverseInnerIterator
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseVector.h b/extern/Eigen2/Eigen/src/Sparse/SparseVector.h
index 8e5a6efeda8..5d47209f790 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseVector.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseVector.h
@@ -360,6 +360,9 @@ class SparseVector<Scalar,_Flags>::InnerIterator
const CompressedStorage<Scalar>& m_data;
int m_id;
const int m_end;
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
#endif // EIGEN_SPARSEVECTOR_H
diff --git a/extern/Eigen2/eigen-update.sh b/extern/Eigen2/eigen-update.sh
index 926a36ef120..797c710c196 100755
--- a/extern/Eigen2/eigen-update.sh
+++ b/extern/Eigen2/eigen-update.sh
@@ -17,7 +17,7 @@ if [ -d eigen2 ]
then
cd eigen2
# put here the version you want to use
- hg up 2.0.6
+ hg up 2.0
rm -f `find Eigen/ -type f -name "CMakeLists.txt"`
cp -r Eigen ..
cd ..