diff options
Diffstat (limited to 'Eigen')
28 files changed, 106 insertions, 26 deletions
diff --git a/Eigen/src/Array/Functors.h b/Eigen/src/Array/Functors.h index fd259f7bc..3a7753d04 100644 --- a/Eigen/src/Array/Functors.h +++ b/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> > @@ -128,6 +130,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/Eigen/src/Array/VectorwiseOp.h b/Eigen/src/Array/VectorwiseOp.h index 71b83eaad..92e5cc000 100644 --- a/Eigen/src/Array/VectorwiseOp.h +++ b/Eigen/src/Array/VectorwiseOp.h @@ -147,6 +147,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_Module diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index d0f292634..2898d8747 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -275,6 +275,8 @@ struct ei_solve_retval<LDLT<_MatrixType>, Rhs> dst = rhs(); dec().solveInPlace(dst); } +private: + ei_solve_retval& operator=(const ei_solve_retval&); }; /** This is the \em in-place version of solve(). diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index ad737aaeb..871530aef 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -270,6 +270,8 @@ struct ei_solve_retval<LLT<_MatrixType, UpLo>, Rhs> dst = rhs(); dec().solveInPlace(dst); } +private: + ei_solve_retval_base& operator=(const ei_solve_retval_base&); }; /** This is the \em in-place version of solve(). diff --git a/Eigen/src/Core/Flagged.h b/Eigen/src/Core/Flagged.h index 754eaf6c5..b98861f42 100644 --- a/Eigen/src/Core/Flagged.h +++ b/Eigen/src/Core/Flagged.h @@ -111,6 +111,9 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas protected: ExpressionTypeNested m_matrix; + + private: + Flagged& operator=(const Flagged&); }; /** \deprecated it is only used by lazy() which is deprecated diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 95ce666c9..9518a6498 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -150,8 +150,10 @@ template<typename MatrixType, unsigned int UpLo> class SelfAdjointView const LDLT<PlainMatrixType> ldlt() const; protected: - const typename MatrixType::Nested m_matrix; + + private: + SelfAdjointView& operator=(const SelfAdjointView&); }; diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index bc5235582..1bff682ff 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -210,15 +210,15 @@ template<typename T, bool Align> inline void ei_conditional_aligned_delete(T *pt } /** \internal \returns the number of elements which have to be skipped such that data are 16 bytes aligned */ -template<typename Scalar> -inline static int ei_alignmentOffset(const Scalar* ptr, int maxOffset) +template<typename Scalar, typename Integer> +inline static Integer ei_alignmentOffset(const Scalar* ptr, Integer maxOffset) { typedef typename ei_packet_traits<Scalar>::type Packet; - const int PacketSize = ei_packet_traits<Scalar>::size; - const int PacketAlignedMask = PacketSize-1; + const Integer PacketSize = ei_packet_traits<Scalar>::size; + const Integer PacketAlignedMask = PacketSize-1; const bool Vectorized = PacketSize>1; return Vectorized - ? std::min<int>( (PacketSize - (int((size_t(ptr)/sizeof(Scalar))) & PacketAlignedMask)) + ? std::min<Integer>( (PacketSize - (Integer((Integer(ptr)/sizeof(Scalar))) & PacketAlignedMask)) & PacketAlignedMask, maxOffset) : 0; } diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index ffa828f71..f2a2fe73e 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -241,6 +241,8 @@ struct ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> const typename Lhs::Nested m_lhs; const typename MatrixType::Nested m_rhs; +private: + ei_homogeneous_left_product_impl& operator=(const ei_homogeneous_left_product_impl&); }; template<typename MatrixType,typename Rhs> @@ -280,6 +282,8 @@ struct ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> const typename MatrixType::Nested m_lhs; const typename Rhs::Nested m_rhs; +private: + ei_homogeneous_right_product_impl& operator=(const ei_homogeneous_right_product_impl&); }; #endif // EIGEN_HOMOGENEOUS_H diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 1358c9490..5505d3bee 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -562,6 +562,9 @@ struct ei_kernel_retval<FullPivLU<_MatrixType> > for(int i = rank(); i < cols; ++i) dst.row(dec().permutationQ().indices().coeff(i)).setZero(); for(int k = 0; k < dimker; ++k) dst.coeffRef(dec().permutationQ().indices().coeff(rank()+k), k) = Scalar(1); } + +private: + ei_kernel_retval& operator=(const ei_kernel_retval&); }; /***** Implementation of image() *****************************************************/ @@ -599,6 +602,9 @@ struct ei_image_retval<FullPivLU<_MatrixType> > for(int i = 0; i < rank(); ++i) dst.col(i) = originalMatrix().col(dec().permutationQ().indices().coeff(pivots.coeff(i))); } + +private: + ei_image_retval& operator=(const ei_image_retval&); }; /***** Implementation of solve() *****************************************************/ @@ -659,6 +665,9 @@ struct ei_solve_retval<FullPivLU<_MatrixType>, Rhs> for(int i = nonzero_pivots; i < dec().matrixLU().cols(); ++i) dst.row(dec().permutationQ().indices().coeff(i)).setZero(); } + +private: + ei_solve_retval& operator=(const ei_solve_retval&); }; /******* MatrixBase methods *****************************************************************/ diff --git a/Eigen/src/LU/Inverse.h b/Eigen/src/LU/Inverse.h index 8afbfda96..c31b3502e 100644 --- a/Eigen/src/LU/Inverse.h +++ b/Eigen/src/LU/Inverse.h @@ -258,6 +258,8 @@ struct ei_inverse_impl : public ReturnByValue<ei_inverse_impl<MatrixType> > { ei_compute_inverse<MatrixTypeNestedCleaned, Dest>::run(m_matrix, dst); } +private: + ei_inverse_impl& operator=(const ei_inverse_impl&); }; /** \lu_module diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h index 95496b943..3b174a873 100644 --- a/Eigen/src/QR/HouseholderQR.h +++ b/Eigen/src/QR/HouseholderQR.h @@ -237,6 +237,8 @@ struct ei_solve_retval<HouseholderQR<_MatrixType>, Rhs> dst.corner(TopLeft, rank, c.cols()) = c.corner(TopLeft, rank, c.cols()); dst.corner(BottomLeft, cols-rank, c.cols()).setZero(); } +private: + ei_solve_retval& operator=(const ei_solve_retval&); }; #endif // EIGEN_HIDE_HEAVY_CODE diff --git a/Eigen/src/SVD/SVD.h b/Eigen/src/SVD/SVD.h index 3c7aaf322..a90704cb9 100644 --- a/Eigen/src/SVD/SVD.h +++ b/Eigen/src/SVD/SVD.h @@ -190,7 +190,7 @@ SVD<MatrixType>& SVD<MatrixType>::compute(const MatrixType& matrix) SingularValuesType& W = m_sigma; bool flag; - int i,its,j,k,l,nm; + int i=0,its=0,j=0,k=0,l=0,nm=0; Scalar anorm, c, f, g, h, s, scale, x, y, z; bool convergence = true; Scalar eps = dummy_precision<Scalar>(); @@ -456,6 +456,8 @@ struct ei_solve_retval<SVD<_MatrixType>, Rhs> dst.col(j) = dec().matrixV() * dst.col(j); } } +private: + ei_solve_retval& operator=(const ei_solve_retval&); }; /** Computes the polar decomposition of the matrix, as a product unitary x positive. diff --git a/Eigen/src/Sparse/CompressedStorage.h b/Eigen/src/Sparse/CompressedStorage.h index fcf5c7bfe..b25b05e91 100644 --- a/Eigen/src/Sparse/CompressedStorage.h +++ b/Eigen/src/Sparse/CompressedStorage.h @@ -93,7 +93,7 @@ class CompressedStorage void append(const Scalar& v, int i) { - int id = m_size; + int id = static_cast<int>(m_size); resize(m_size+1, 1); m_values[id] = v; m_indices[id] = i; @@ -135,7 +135,7 @@ class CompressedStorage else end = mid; } - return start; + return static_cast<int>(start); } /** \returns the stored value at index \a key diff --git a/Eigen/src/Sparse/DynamicSparseMatrix.h b/Eigen/src/Sparse/DynamicSparseMatrix.h index 189a56bd0..f4f83533a 100644 --- a/Eigen/src/Sparse/DynamicSparseMatrix.h +++ b/Eigen/src/Sparse/DynamicSparseMatrix.h @@ -88,7 +88,7 @@ class DynamicSparseMatrix inline int rows() const { return IsRowMajor ? outerSize() : m_innerSize; } inline int cols() const { return IsRowMajor ? m_innerSize : outerSize(); } inline int innerSize() const { return m_innerSize; } - inline int outerSize() const { return m_data.size(); } + inline int outerSize() const { return static_cast<int>(m_data.size()); } inline int innerNonZeros(int j) const { return m_data[j].size(); } std::vector<CompressedStorage<Scalar> >& _data() { return m_data; } @@ -128,7 +128,7 @@ class DynamicSparseMatrix { int res = 0; for (int j=0; j<outerSize(); ++j) - res += m_data[j].size(); + res += static_cast<int>(m_data[j].size()); return res; } @@ -195,7 +195,7 @@ class DynamicSparseMatrix const int inner = IsRowMajor ? col : row; int startId = 0; - int id = m_data[outer].size() - 1; + int id = static_cast<int>(m_data[outer].size()) - 1; m_data[outer].resize(id+2,1); while ( (id >= startId) && (m_data[outer].index(id) > inner) ) diff --git a/Eigen/src/Sparse/RandomSetter.h b/Eigen/src/Sparse/RandomSetter.h index 50824eba1..b34ca19a8 100644 --- a/Eigen/src/Sparse/RandomSetter.h +++ b/Eigen/src/Sparse/RandomSetter.h @@ -322,7 +322,7 @@ class RandomSetter { int nz = 0; for (int k=0; k<m_outerPackets; ++k) - nz += m_hashmaps[k].size(); + nz += static_cast<int>(m_hashmaps[k].size()); return nz; } diff --git a/Eigen/src/Sparse/SparseBlock.h b/Eigen/src/Sparse/SparseBlock.h index 6659a88e2..1fe919736 100644 --- a/Eigen/src/Sparse/SparseBlock.h +++ b/Eigen/src/Sparse/SparseBlock.h @@ -220,6 +220,8 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options>, Size> inline int col() const { return IsRowMajor ? this->index() : m_outer; } protected: int m_outer; + private: + InnerIterator& operator=(const InnerIterator&); }; inline SparseInnerVectorSet(const MatrixType& matrix, int outerStart, int outerSize) diff --git a/Eigen/src/Sparse/SparseCwise.h b/Eigen/src/Sparse/SparseCwise.h index bf8f2355c..c2e302956 100644 --- a/Eigen/src/Sparse/SparseCwise.h +++ b/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/Eigen/src/Sparse/SparseCwiseBinaryOp.h b/Eigen/src/Sparse/SparseCwiseBinaryOp.h index 2dcd6b944..bb93b60ef 100644 --- a/Eigen/src/Sparse/SparseCwiseBinaryOp.h +++ b/Eigen/src/Sparse/SparseCwiseBinaryOp.h @@ -126,6 +126,9 @@ 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 +200,8 @@ 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,8 @@ 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) diff --git a/Eigen/src/Sparse/SparseCwiseUnaryOp.h b/Eigen/src/Sparse/SparseCwiseUnaryOp.h index 9a73374bd..9c102ed64 100644 --- a/Eigen/src/Sparse/SparseCwiseUnaryOp.h +++ b/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/Eigen/src/Sparse/SparseDiagonalProduct.h b/Eigen/src/Sparse/SparseDiagonalProduct.h index e9ba47f70..24f724ad1 100644 --- a/Eigen/src/Sparse/SparseDiagonalProduct.h +++ b/Eigen/src/Sparse/SparseDiagonalProduct.h @@ -133,6 +133,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> @@ -165,6 +167,8 @@ class ei_sparse_diagonal_product_inner_iterator_selector const SparseDiagonalProductType& expr, int outer) : Base(expr.lhs().innerVector(outer) .cwise()* expr.rhs().diagonal().transpose(), 0) {} + private: + ei_sparse_diagonal_product_inner_iterator_selector& operator=(const ei_sparse_diagonal_product_inner_iterator_selector&); }; // SparseMatrixBase functions diff --git a/Eigen/src/Sparse/SparseFlagged.h b/Eigen/src/Sparse/SparseFlagged.h index 386a80abc..34233e5a1 100644 --- a/Eigen/src/Sparse/SparseFlagged.h +++ b/Eigen/src/Sparse/SparseFlagged.h @@ -64,6 +64,9 @@ 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> @@ -74,6 +77,9 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> 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/Eigen/src/Sparse/SparseMatrix.h b/Eigen/src/Sparse/SparseMatrix.h index 36fa123fb..e1c740cdb 100644 --- a/Eigen/src/Sparse/SparseMatrix.h +++ b/Eigen/src/Sparse/SparseMatrix.h @@ -138,7 +138,7 @@ class SparseMatrix } /** \returns the number of non zero coefficients */ - inline int nonZeros() const { return m_data.size(); } + inline int nonZeros() const { return static_cast<int>(m_data.size()); } /** \deprecated use setZero() and reserve() * Initializes the filling process of \c *this. @@ -236,7 +236,7 @@ class SparseMatrix // we start a new inner vector while (previousOuter>=0 && m_outerIndex[previousOuter]==0) { - m_outerIndex[previousOuter] = m_data.size(); + m_outerIndex[previousOuter] = static_cast<int>(m_data.size()); --previousOuter; } m_outerIndex[outer+1] = m_outerIndex[outer]; @@ -335,7 +335,7 @@ class SparseMatrix */ inline void finalize() { - int size = m_data.size(); + int size = static_cast<int>(m_data.size()); int i = m_outerSize; // find the last filled column while (i>=0 && m_outerIndex[i]==0) @@ -557,6 +557,9 @@ class SparseMatrix<Scalar,_Options>::InnerIterator int m_id; const int m_start; const int m_end; + + private: + InnerIterator& operator=(const InnerIterator&); }; #endif // EIGEN_SPARSEMATRIX_H diff --git a/Eigen/src/Sparse/SparseTranspose.h b/Eigen/src/Sparse/SparseTranspose.h index 9a702739d..2689caf79 100644 --- a/Eigen/src/Sparse/SparseTranspose.h +++ b/Eigen/src/Sparse/SparseTranspose.h @@ -62,6 +62,9 @@ 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 @@ -74,6 +77,9 @@ template<typename MatrixType> class SparseTranspose<MatrixType>::InnerIterator : {} inline int row() const { return Base::col(); } inline int col() const { return Base::row(); } + + private: + InnerIterator& operator=(const InnerIterator&); }; template<typename MatrixType> class SparseTranspose<MatrixType>::ReverseInnerIterator : public MatrixType::ReverseInnerIterator diff --git a/Eigen/src/Sparse/SparseTriangular.h b/Eigen/src/Sparse/SparseTriangular.h index 42e7ff02a..c3d3ea48f 100644 --- a/Eigen/src/Sparse/SparseTriangular.h +++ b/Eigen/src/Sparse/SparseTriangular.h @@ -47,6 +47,9 @@ template<typename ExpressionType, int Mode> class SparseTriangular protected: ExpressionTypeNested m_matrix; + + private: + SparseTriangular& operator=(const SparseTriangular&); }; template<typename Derived> diff --git a/Eigen/src/Sparse/SparseVector.h b/Eigen/src/Sparse/SparseVector.h index 1fa1980b2..b87cae856 100644 --- a/Eigen/src/Sparse/SparseVector.h +++ b/Eigen/src/Sparse/SparseVector.h @@ -125,7 +125,7 @@ class SparseVector inline void setZero() { m_data.clear(); } /** \returns the number of non zero coefficients */ - inline int nonZeros() const { return m_data.size(); } + inline int nonZeros() const { return static_cast<int>(m_data.size()); } inline void startVec(int outer) { @@ -374,13 +374,13 @@ class SparseVector<Scalar,_Options>::InnerIterator { public: InnerIterator(const SparseVector& vec, int outer=0) - : m_data(vec.m_data), m_id(0), m_end(m_data.size()) + : m_data(vec.m_data), m_id(0), m_end(static_cast<int>(m_data.size())) { ei_assert(outer==0); } InnerIterator(const CompressedStorage<Scalar>& data) - : m_data(data), m_id(0), m_end(m_data.size()) + : m_data(data), m_id(0), m_end(static_cast<int>(m_data.size())) {} template<unsigned int Added, unsigned int Removed> diff --git a/Eigen/src/misc/Image.h b/Eigen/src/misc/Image.h index 9ed5d5f70..05ffa667c 100644 --- a/Eigen/src/misc/Image.h +++ b/Eigen/src/misc/Image.h @@ -67,9 +67,12 @@ template<typename _DecompositionType> struct ei_image_retval_base } protected: - const DecompositionType& m_dec; - int m_rank, m_cols; - const MatrixType& m_originalMatrix; + const DecompositionType& m_dec; + int m_rank, m_cols; + const MatrixType& m_originalMatrix; + + private: + ei_image_retval_base& operator=(const ei_image_retval_base&); }; #define EIGEN_MAKE_IMAGE_HELPERS(DecompositionType) \ diff --git a/Eigen/src/misc/Kernel.h b/Eigen/src/misc/Kernel.h index 717eef450..bb8458e11 100644 --- a/Eigen/src/misc/Kernel.h +++ b/Eigen/src/misc/Kernel.h @@ -67,8 +67,11 @@ template<typename _DecompositionType> struct ei_kernel_retval_base } protected: - const DecompositionType& m_dec; - int m_rank, m_cols; + const DecompositionType& m_dec; + int m_rank, m_cols; + + private: + ei_kernel_retval_base& operator=(const ei_kernel_retval_base&); }; #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \ diff --git a/Eigen/src/misc/Solve.h b/Eigen/src/misc/Solve.h index d93869121..75597564b 100644 --- a/Eigen/src/misc/Solve.h +++ b/Eigen/src/misc/Solve.h @@ -61,8 +61,11 @@ template<typename _DecompositionType, typename Rhs> struct ei_solve_retval_base } protected: - const DecompositionType& m_dec; - const typename Rhs::Nested m_rhs; + const DecompositionType& m_dec; + const typename Rhs::Nested m_rhs; + + private: + ei_solve_retval_base& operator=(const ei_solve_retval_base&); }; #define EIGEN_MAKE_SOLVE_HELPERS(DecompositionType,Rhs) \ |