diff options
author | sotech117 <michael_foiani@brown.edu> | 2024-04-09 03:14:17 -0400 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2024-04-09 03:14:17 -0400 |
commit | 7a8d0d8bc2572707c9d35006f30ea835c86954b0 (patch) | |
tree | dedb9a65c1698202ad485378b4186b667008abe5 /Eigen/src/Core/DiagonalProduct.h | |
parent | 818324678bd5dca790c57048e5012d2937a4b5e5 (diff) |
first draft to generate waves
Diffstat (limited to 'Eigen/src/Core/DiagonalProduct.h')
-rw-r--r-- | Eigen/src/Core/DiagonalProduct.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h new file mode 100644 index 0000000..7911d1c --- /dev/null +++ b/Eigen/src/Core/DiagonalProduct.h @@ -0,0 +1,28 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> +// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com> +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_DIAGONALPRODUCT_H +#define EIGEN_DIAGONALPRODUCT_H + +namespace Eigen { + +/** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal. + */ +template<typename Derived> +template<typename DiagonalDerived> +EIGEN_DEVICE_FUNC inline const Product<Derived, DiagonalDerived, LazyProduct> +MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal) const +{ + return Product<Derived, DiagonalDerived, LazyProduct>(derived(),a_diagonal.derived()); +} + +} // end namespace Eigen + +#endif // EIGEN_DIAGONALPRODUCT_H |