Bayesian-Optimization / src / mean_functors.cpp

#include "log.hpp"
#include "parser.hpp"
#include "mean_functors.hpp"
#include "mean_atomic.hpp"
#include "mean_combined.hpp"

namespace bayesopt
    registry["mZero"] = & create_func<ZeroFunction>;
    registry["mOne"] = & create_func<OneFunction>;
    registry["mConst"] = & create_func<ConstantFunction>;
    registry["mLinear"] = & create_func<LinearFunction>;
    registry["mSum"] = & create_func<SumFunction>;

   * \brief Factory model for kernel functions
   * This function is based on the libgp library by Manuel Blum
   * which follows the squeme of GPML by Rasmussen and Nickisch
   * @param name string with the kernel structure
   * @param imput_dim number of input dimensions
   * @return kernel pointer
  ParametricFunction* MeanFactory::create(std::string name, size_t input_dim)
    ParametricFunction *mFunc;
    std::string os, os1, os2;

    std::map<std::string,MeanFactory::create_func_definition>::iterator it = registry.find(os);
    if (it == registry.end()) 
	FILE_LOG(logERROR) << "Error: Fatal error while parsing mean function: "
			   << os << " not found" << std::endl;
	return NULL;
    mFunc = registry.find(os)->second();
    if (os1.length() == 0 && os2.length() == 0) 
	mFunc->init(input_dim, create(os1,input_dim), 
    return mFunc;


}//namespace bayesopt
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.