1 #ifndef AFFINEOPERATOR_H
2 #define AFFINEOPERATOR_H
41 AffineOperator(std::shared_ptr<LinearOperator>
const& Ain, Eigen::VectorXd
const& bIn);
46 std::shared_ptr<LinearOperator>
Linear()
const{
return A;};
49 Eigen::VectorXd
const&
Offset()
const{
return b;};
52 int rows()
const {
return A->rows(); }
55 int cols()
const {
return A->cols(); }
57 template<
typename OtherType>
58 static std::shared_ptr<AffineOperator>
Create(OtherType
const&
A, Eigen::VectorXd
const&
b)
65 std::shared_ptr<LinearOperator>
A;
71 virtual void GradientImpl(
unsigned int const outputDimWrt,
72 unsigned int const inputDimWrt,
74 Eigen::VectorXd
const& sensitivity)
override;
76 virtual void JacobianImpl(
unsigned int const outputDimWrt,
77 unsigned int const inputDimWrt,
81 unsigned int const inputDimWrt,
83 Eigen::VectorXd
const& vec)
override;
Generic affine operator which adds an offset to a linear operator. @seealso LinearOperator.
AffineOperator(T const &Ain, Eigen::VectorXd const &bIn)
virtual void ApplyJacobianImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, muq::Modeling::ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &vec) override
std::shared_ptr< LinearOperator > Linear() const
Eigen::VectorXd const & Offset() const
virtual void EvaluateImpl(muq::Modeling::ref_vector< Eigen::VectorXd > const &input) override
virtual void JacobianImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, muq::Modeling::ref_vector< Eigen::VectorXd > const &input) override
static std::shared_ptr< AffineOperator > Create(OtherType const &A, Eigen::VectorXd const &b)
virtual ~AffineOperator()
virtual void GradientImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, muq::Modeling::ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &sensitivity) override
std::shared_ptr< LinearOperator > A
Generic linear operator base class.
Provides an abstract interface for defining vector-valued model components.
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...