MUQ  0.4.3
JacobianPiece.h
Go to the documentation of this file.
1 #ifndef JACOBIANPIECE_H_
2 #define JACOBIANPIECE_H_
3 
5 
6 namespace muq{
7 namespace Modeling{
8 
15  class JacobianPiece : public ModPiece {
16 
17  public:
18  JacobianPiece(std::shared_ptr<ModPiece> const& basePieceIn,
19  unsigned int const outWrt,
20  unsigned int const inWrt);
21 
22  virtual ~JacobianPiece() = default;
23 
24  std::shared_ptr<ModPiece> BasePiece(){return basePiece;};
25 
26  protected:
27 
28  virtual void EvaluateImpl(ref_vector<Eigen::VectorXd> const& input) override;
29 
30  static Eigen::VectorXi GetInputSizes(std::shared_ptr<ModPiece> const& basePiece,
31  unsigned int const outWrt);
32 
33  static Eigen::VectorXi GetOutputSizes(std::shared_ptr<ModPiece> const& basePiece,
34  unsigned int const inWrt);
35 
36  std::shared_ptr<ModPiece> basePiece;
37 
38  const unsigned int outWrt, inWrt;
39 
40  }; // class JacobianPiece
41 
42 } // namespace Modeling
43 } // namespace muq
44 
45 #endif
A wrapper around another ModPiece that evaluates the action of the other piece's Jacobian on a vector...
Definition: JacobianPiece.h:15
virtual ~JacobianPiece()=default
const unsigned int outWrt
Definition: JacobianPiece.h:38
std::shared_ptr< ModPiece > basePiece
Definition: JacobianPiece.h:36
virtual void EvaluateImpl(ref_vector< Eigen::VectorXd > const &input) override
static Eigen::VectorXi GetInputSizes(std::shared_ptr< ModPiece > const &basePiece, unsigned int const outWrt)
std::shared_ptr< ModPiece > BasePiece()
Definition: JacobianPiece.h:24
JacobianPiece(std::shared_ptr< ModPiece > const &basePieceIn, unsigned int const outWrt, unsigned int const inWrt)
const unsigned int inWrt
Definition: JacobianPiece.h:38
static Eigen::VectorXi GetOutputSizes(std::shared_ptr< ModPiece > const &basePiece, unsigned int const inWrt)
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