1 #ifndef CONSTANTPIECE_H_
2 #define CONSTANTPIECE_H_
30 template<
typename ith,
typename... Args>
47 template<
typename last>
69 void SetOutputs(std::vector<boost::any>
const& outs);
76 template<
typename ith,
typename... Args>
79 std::vector<boost::any> outs(0);
82 outs.insert(outs.begin(), in);
96 template<
typename ith,
typename... Args>
97 void SetOutputs(std::vector<boost::any>& outs, ith
const& in, Args... args) {
110 template<
typename last>
A muq::Modeling::WorkPiece with no inputs and known, constant outputs.
ConstantPiece()
Create a muq::Modeling::ConstantPiece with no given outputs.
void SetOutputs(ith const &in, Args... args)
Create a muq::Modeling::ConstantPiece with the outputs given indivually.
Base class for MUQ's modelling envronment.
std::map< unsigned int, std::string > outputTypes
The output types.
WorkPiece()
Create a muq::Modeling::WorkPiece with no fixed number of inputs and outputs and variable input/outpu...
virtual void EvaluateImpl(ref_vector< boost::any > const &inputs)=0
User-implemented function that determines the behavior of this muq::Modeling::WorkPiece.
std::vector< std::string > Types(std::vector< boost::any > const &vec) const
Get the types from a vector of boost::any's.
bool clearOutputs
Clear outputs every time Evaluate is called.
int numOutputs
The number of outputs.
std::vector< boost::any > outputs
The outputs.
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...