MUQ  0.4.3
GradientPiece.h
Go to the documentation of this file.
1 #ifndef GRADIENTPIECE_H_
2 #define GRADIENTPIECE_H_
3 
5 
6 namespace muq{
7 namespace Modeling{
8 
9  class GradientPiece : public ModPiece {
10 
11  public:
12  GradientPiece(std::shared_ptr<ModPiece> const& basePieceIn,
13  unsigned int const outWrt,
14  unsigned int const inWrt);
15 
16  virtual ~GradientPiece() = default;
17 
18  std::shared_ptr<ModPiece> BasePiece(){return basePiece;};
19 
20  protected:
21 
22  virtual void EvaluateImpl(ref_vector<Eigen::VectorXd> const& input) override;
23 
24  virtual void ApplyJacobianImpl(unsigned int const outputDimWrt,
25  unsigned int const inputDimWrt,
26  ref_vector<Eigen::VectorXd> const& input,
27  Eigen::VectorXd const& vec) override;
28 
29  static Eigen::VectorXi GetInputSizes(std::shared_ptr<ModPiece> const& basePiece,
30  unsigned int const outWrt);
31 
32  static Eigen::VectorXi GetOutputSizes(std::shared_ptr<ModPiece> const& basePiece,
33  unsigned int const inWrt);
34 
35  std::shared_ptr<ModPiece> basePiece;
36 
37  const unsigned int outWrt, inWrt;
38 
39  }; // class GradientPiece
40 
41 } // namespace Modeling
42 } // namespace muq
43 
44 
45 
46 #endif
static Eigen::VectorXi GetOutputSizes(std::shared_ptr< ModPiece > const &basePiece, unsigned int const inWrt)
virtual void EvaluateImpl(ref_vector< Eigen::VectorXd > const &input) override
static Eigen::VectorXi GetInputSizes(std::shared_ptr< ModPiece > const &basePiece, unsigned int const outWrt)
virtual void ApplyJacobianImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &vec) override
GradientPiece(std::shared_ptr< ModPiece > const &basePieceIn, unsigned int const outWrt, unsigned int const inWrt)
const unsigned int inWrt
Definition: GradientPiece.h:37
std::shared_ptr< ModPiece > BasePiece()
Definition: GradientPiece.h:18
const unsigned int outWrt
Definition: GradientPiece.h:37
virtual ~GradientPiece()=default
std::shared_ptr< ModPiece > basePiece
Definition: GradientPiece.h:35
Provides an abstract interface for defining vector-valued model components.
Definition: ModPiece.h:148
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...
Definition: WorkPiece.h:37