diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-01-24 10:32:49 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-01-24 10:32:49 +0100 |
commit | e1f1091fde660581d64b54ff1019bc494dbbca89 (patch) | |
tree | 3dd2646fb88b902c954878a2d25ece56da428865 /Eigen/src/Core/DiagonalMatrix.h | |
parent | b9d314ae19b1c857adfe42b7eaecf2695428f0ed (diff) |
Add support for dense ?= diagonal
Diffstat (limited to 'Eigen/src/Core/DiagonalMatrix.h')
-rw-r--r-- | Eigen/src/Core/DiagonalMatrix.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index e3dc71336..49b9b7925 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -326,6 +326,12 @@ struct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Dense, Scalar> dst.setZero(); dst.diagonal() = src.diagonal(); } + + static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar> &/*func*/) + { dst.diagonal() += src.diagonal(); } + + static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar> &/*func*/) + { dst.diagonal() -= src.diagonal(); } }; } // namespace internal |