diff options
author | 2009-11-18 18:15:19 +0100 | |
---|---|---|
committer | 2009-11-18 18:15:19 +0100 | |
commit | e3d890bc5a89798eff50ff6650292b4fa934f72e (patch) | |
tree | 3c7d40332a019dce2773fc6a096d046eeab9fb7a /Eigen/src/Sparse | |
parent | 0529ecfe1b43d40e40755a2d856188d3ded2c14e (diff) |
Another big refactoring change:
* add a new Eigen2Support module including Cwise, Flagged, and some other deprecated stuff
* add a few cwiseXxx functions
* adapt a few modules to use cwiseXxx instead of the .cwise() prefix
Diffstat (limited to 'Eigen/src/Sparse')
-rw-r--r-- | Eigen/src/Sparse/SparseCwiseBinaryOp.h | 32 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseMatrixBase.h | 13 |
2 files changed, 23 insertions, 22 deletions
diff --git a/Eigen/src/Sparse/SparseCwiseBinaryOp.h b/Eigen/src/Sparse/SparseCwiseBinaryOp.h index 5dd7edc00..b1f228dbe 100644 --- a/Eigen/src/Sparse/SparseCwiseBinaryOp.h +++ b/Eigen/src/Sparse/SparseCwiseBinaryOp.h @@ -283,15 +283,15 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<ei_scalar_product_op<T>, * Implementation of SparseMatrixBase and SparseCwise functions/operators ***************************************************************************/ -template<typename Derived> -template<typename OtherDerived> -EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_difference_op<typename ei_traits<Derived>::Scalar>, - Derived, OtherDerived> -SparseMatrixBase<Derived>::operator-(const SparseMatrixBase<OtherDerived> &other) const -{ - return CwiseBinaryOp<ei_scalar_difference_op<Scalar>, - Derived, OtherDerived>(derived(), other.derived()); -} +// template<typename Derived> +// template<typename OtherDerived> +// EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_difference_op<typename ei_traits<Derived>::Scalar>, +// Derived, OtherDerived> +// SparseMatrixBase<Derived>::operator-(const SparseMatrixBase<OtherDerived> &other) const +// { +// return CwiseBinaryOp<ei_scalar_difference_op<Scalar>, +// Derived, OtherDerived>(derived(), other.derived()); +// } template<typename Derived> template<typename OtherDerived> @@ -301,13 +301,13 @@ SparseMatrixBase<Derived>::operator-=(const SparseMatrixBase<OtherDerived> &othe return *this = derived() - other.derived(); } -template<typename Derived> -template<typename OtherDerived> -EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_sum_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived> -SparseMatrixBase<Derived>::operator+(const SparseMatrixBase<OtherDerived> &other) const -{ - return CwiseBinaryOp<ei_scalar_sum_op<Scalar>, Derived, OtherDerived>(derived(), other.derived()); -} +// template<typename Derived> +// template<typename OtherDerived> +// EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_sum_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived> +// SparseMatrixBase<Derived>::operator+(const SparseMatrixBase<OtherDerived> &other) const +// { +// return CwiseBinaryOp<ei_scalar_sum_op<Scalar>, Derived, OtherDerived>(derived(), other.derived()); +// } template<typename Derived> template<typename OtherDerived> diff --git a/Eigen/src/Sparse/SparseMatrixBase.h b/Eigen/src/Sparse/SparseMatrixBase.h index 2b6970818..77dba5e90 100644 --- a/Eigen/src/Sparse/SparseMatrixBase.h +++ b/Eigen/src/Sparse/SparseMatrixBase.h @@ -111,6 +111,7 @@ template<typename Derived> class SparseMatrixBase : public AnyMatrixBase<Derived #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase #include "../Core/CwiseUnaryOps.h" + #include "../Core/CwiseBinaryOps.h" #undef EIGEN_CURRENT_STORAGE_BASE_CLASS #ifndef EIGEN_PARSED_BY_DOXYGEN @@ -290,13 +291,13 @@ template<typename Derived> class SparseMatrixBase : public AnyMatrixBase<Derived // const SparseCwiseUnaryOp<ei_scalar_opposite_op<typename ei_traits<Derived>::Scalar>,Derived> operator-() const; - template<typename OtherDerived> - const CwiseBinaryOp<ei_scalar_sum_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived> - operator+(const SparseMatrixBase<OtherDerived> &other) const; +// template<typename OtherDerived> +// const CwiseBinaryOp<ei_scalar_sum_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived> +// operator+(const SparseMatrixBase<OtherDerived> &other) const; - template<typename OtherDerived> - const CwiseBinaryOp<ei_scalar_difference_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived> - operator-(const SparseMatrixBase<OtherDerived> &other) const; +// template<typename OtherDerived> +// const CwiseBinaryOp<ei_scalar_difference_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived> +// operator-(const SparseMatrixBase<OtherDerived> &other) const; template<typename OtherDerived> Derived& operator+=(const SparseMatrixBase<OtherDerived>& other); |