MUQ  0.4.3
ScaleVector.h
Go to the documentation of this file.
1 #ifndef SCALEVECTOR_H_
2 #define SCALEVECTOR_H_
3 
5 
6 namespace muq {
7  namespace Modeling {
8  class ScaleVector : public ModPiece {
9  public:
10 
11  ScaleVector(double const scale, unsigned int const dim);
12 
13  virtual ~ScaleVector() = default;
14 
15  private:
16 
17  virtual void EvaluateImpl(ref_vector<Eigen::VectorXd> const& inputs) override;
18 
19  virtual void JacobianImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector<Eigen::VectorXd> const& inputs) override;
20 
21  virtual void GradientImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector<Eigen::VectorXd> const& inputs, Eigen::VectorXd const& sens) override;
22 
23  virtual void ApplyJacobianImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector<Eigen::VectorXd> const& inputs, Eigen::VectorXd const& targ) override;
24 
25  const double scale;
26  };
27  } // namespace Modeling
28 } // namespace muq
29 
30 #endif
Provides an abstract interface for defining vector-valued model components.
Definition: ModPiece.h:148
virtual ~ScaleVector()=default
virtual void ApplyJacobianImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector< Eigen::VectorXd > const &inputs, Eigen::VectorXd const &targ) override
Definition: ScaleVector.cpp:20
virtual void GradientImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector< Eigen::VectorXd > const &inputs, Eigen::VectorXd const &sens) override
Definition: ScaleVector.cpp:16
virtual void EvaluateImpl(ref_vector< Eigen::VectorXd > const &inputs) override
Definition: ScaleVector.cpp:7
virtual void JacobianImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector< Eigen::VectorXd > const &inputs) override
Definition: ScaleVector.cpp:12
ScaleVector(double const scale, unsigned int const dim)
Definition: ScaleVector.cpp:5
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...
Definition: WorkPiece.h:37