13 IndexedScalarBasis::IndexedScalarBasis() :
14 WorkPiece(std::vector<std::string>({
typeid(
unsigned int).
name(),
typeid(double).
name()}),
15 std::vector<std::string>({
typeid(double).name()}))
20 const unsigned int order = boost::any_cast<unsigned int>(inputs[0]);
21 const double x = boost::any_cast<double>(inputs[1]);
33 auto it = map->find(polyName);
35 std::string message =
"The basis family, \"" + polyName +
"\" has not been registered with the scalar basis factory. Does the class exist?\n Registered families include:\n";
36 for(
auto iter = map->begin(); iter!=map->end(); ++iter)
37 message +=
" " + iter->first +
"\n";
49 static std::shared_ptr<ScalarBasisMapType> map;
53 map = std::make_shared<ScalarBasisMapType>();
virtual void EvaluateImpl(muq::Modeling::ref_vector< boost::any > const &inputs)
Evaluate the polynomial at a given point and order.
static std::shared_ptr< IndexedScalarBasis > Construct(std::string const &polyName)
virtual double BasisEvaluate(int const order, double const x) const =0
Evaluate the specific basis type (must be implemented by the child)
static std::shared_ptr< ScalarBasisMapType > GetScalarBasisMap()
Base class for MUQ's modelling envronment.
std::vector< boost::any > outputs
The outputs.
std::string name
A unique name for this WorkPiece. Defaults to <ClassName>_<id>
Used when a child class has not been registered with the factory method.
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...