MUQ
0.4.3
DiagonalOperator.cpp
Go to the documentation of this file.
1
#include "
MUQ/Modeling/LinearAlgebra/DiagonalOperator.h
"
2
3
using namespace
muq::Modeling
;
4
5
6
DiagonalOperator::DiagonalOperator
(Eigen::VectorXd
const
& diagIn) :
LinearOperator
(diagIn.rows(), diagIn.rows()),
7
diag(diagIn)
8
{}
9
11
Eigen::MatrixXd
DiagonalOperator::Apply
(Eigen::Ref<const Eigen::MatrixXd>
const
& x)
12
{
13
return
diag
.asDiagonal()*x;
14
}
DiagonalOperator.h
muq::Modeling::DiagonalOperator::diag
const Eigen::VectorXd diag
Definition:
DiagonalOperator.h:25
muq::Modeling::DiagonalOperator::DiagonalOperator
DiagonalOperator(Eigen::VectorXd const &diagIn)
Definition:
DiagonalOperator.cpp:6
muq::Modeling::DiagonalOperator::Apply
virtual Eigen::MatrixXd Apply(Eigen::Ref< const Eigen::MatrixXd > const &x) override
Definition:
DiagonalOperator.cpp:11
muq::Modeling::LinearOperator
Generic linear operator base class.
Definition:
LinearOperator.h:71
muq::Modeling
Definition:
AllClassWrappers.h:7
doxygen_prep
modules
Modeling
src
LinearAlgebra
DiagonalOperator.cpp
Generated on Wed Jun 12 2024 00:48:28 for MUQ by
1.9.1