11 MeanFactory::MeanFactory()
13 registry[
"mZero"] = & create_func<ZeroFunction>;
14 registry[
"mOne"] = & create_func<OneFunction>;
15 registry[
"mConst"] = & create_func<ConstantFunction>;
16 registry[
"mLinear"] = & create_func<LinearFunction>;
17 registry[
"mSum"] = & create_func<SumFunction>;
34 std::string os, os1, os2;
37 std::map<std::string,MeanFactory::create_func_definition>::iterator it = registry.find(os);
38 if (it == registry.end())
40 FILE_LOG(logERROR) <<
"Error: Fatal error while parsing mean function: " 41 << os <<
" not found" << std::endl;
44 mFunc = registry.find(os)->second();
45 if (os1.length() == 0 && os2.length() == 0)
47 mFunc->init(input_dim);
51 mFunc->init(input_dim,
create(os1,input_dim),
60 MeanModel::MeanModel(
size_t dim,
Parameters parameters)
62 setMean(parameters.
mean,dim);
72 mMean.reset(mPFactory.
create(m_name,dim));
74 if (
"mZero" == m_name)
77 mS_Mu = svectord(1,1e-10);
79 else if(
"mOne" == m_name)
81 mMu = svectord(1,1.0);
82 mS_Mu = svectord(1,1e-10);
86 mMu = muv; mS_Mu = smu;
89 mMean->setParameters(mMu);
97 setMean(vmu, smu, mean.
name, dim);
void setMean(const vectord &muv, const vectord &smu, std::string m_name, size_t dim)
Select the parametric part of the surrogate process.
Parametric functions that combine other functions.
std::string name
Name of the mean function.
vectord coef_std
Basis function coefficients (std)
MeanParameters mean
Mean (parametric function) parameters.
Namespace of the library interface.
vectord coef_mean
Basis function coefficients (mean)
ParametricFunction * create(std::string name, size_t input_dim)
Factory model for kernel functions This function is based on the libgp library by Manuel Blum https:/...
Factory model for parametric functions This factory is based on the libgp library by Manuel Blum http...
Interface for mean functors.
Functions to parse strings.
void parseExpresion(std::string input, std::string &parent, std::string &child1, std::string &child2)
Parse expresions of the form Parent(Child1, Child2).
Modules and helper macros for logging.
Atomic (simple) parametric functions.
Mean (parametric) functions.