1 #ifndef REPLICATEOPERATOR_H_
2 #define REPLICATEOPERATOR_H_
3 
4 #include "MUQ/Modeling/ModPiece.h"
5 
6 namespace muq {
7   namespace Modeling {
8 
9     /**
10       @brief A muq::Modeling::ModPiece that replicates a single input vector \f$N\f$ times.
11       @details Given a single input vector of length \f$M\f$, this ModPiece returns a
12       vector of length \f$NM\f$ that contains \f$N\f$ replicates of the input vector.
13 
14     */
15     class ReplicateOperator: public ModPiece {
16     public:
17 
18       /**
19 	       @param[in] vectorDim The dimension of the input vector
20          @param[in] numRepeat The number of times to replicate the input vector.
21        */
22       ReplicateOperator(unsigned int vectorDim, unsigned int numRepeat);
23 
24 
25     private:
26       unsigned int numRepl;
27 
28       virtual void EvaluateImpl(muq::Modeling::ref_vector<Eigen::VectorXd> const& inputs) override;
29 
30     }; // class ConstantVector
31 
32   } // namespace Modeling
33 } // namespace muq
34 
35 #endif
36