MUQ  0.4.3
ConstantVector.h
Go to the documentation of this file.
1 #ifndef CONSTANTVECTOR_H_
2 #define CONSTANTVECTOR_H_
3 
5 
6 namespace muq {
7  namespace Modeling {
8 
10  class ConstantVector : public ModPiece {
11  public:
12 
14 
17  ConstantVector(std::vector<Eigen::VectorXd> const& outs);
18 
20 
24  ConstantVector(std::vector<boost::any> const& outs);
25 
27 
30  ConstantVector(Eigen::VectorXd const& valIn);
31 
33 
36  void SetValue(Eigen::VectorXd const& valIn);
37 
38  private:
40 
43  virtual void EvaluateImpl(muq::Modeling::ref_vector<Eigen::VectorXd> const& inputs) override;
44 
45  static Eigen::VectorXi OutSizes(std::vector<Eigen::VectorXd> const& outs);
46 
47  static Eigen::VectorXi OutSizes(std::vector<boost::any> const& outs);
48 
49  }; // class ConstantVector
50 
51  } // namespace Modeling
52 } // namespace muq
53 
54 #endif
A muq::Modeling::ModPiece with no inputs and a single known vector-valued output.
void SetValue(Eigen::VectorXd const &valIn)
Set the outputs.
static Eigen::VectorXi OutSizes(std::vector< Eigen::VectorXd > const &outs)
virtual void EvaluateImpl(muq::Modeling::ref_vector< Eigen::VectorXd > const &inputs) override
The outputs are already set and not cleared so don't do anything.
ConstantVector(std::vector< Eigen::VectorXd > const &outs)
Create a muq::Modeling::ConstantPiece with the outputs given in a vector of vectors.
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