Source

BayesOpt / include / criteria_atomic.hpp

Diff from to

File include/criteria_atomic.hpp

       mExp = 1;
     };
 
-    int setParameters(const vectord &params)
-    {
-      mExp = static_cast<size_t>(params(0));
-      return 0;
-    };
+    void setParameters(const vectord &params)
+    { mExp = static_cast<size_t>(params(0)); };
 
     size_t nParameters() {return 1;};
 
       mBias = 0.01;
       mExp = 1;
     };
-    int setParameters(const vectord &params)
+
+    void setParameters(const vectord &params)
     {
       mExp = static_cast<size_t>(params(0));
       mBias = params(1);
-      return 0;
     };
 
     size_t nParameters() {return 2;};
       mProc = proc;
       mBeta = 1.0;
     };
-    int setParameters(const vectord &params)
-    {
-      mBeta = params(0);
-      return 0;
-    };
+    void setParameters(const vectord &params)
+    { mBeta = params(0); };
 
     size_t nParameters() {return 1;};
 
       mProc = proc;
       mEpsilon = 0.01;
     };
-    int setParameters(const vectord &params)
-    {
-      mEpsilon = params(0);
-      return 0;
-    };
+    void setParameters(const vectord &params)
+    { mEpsilon = params(0); };
 
     size_t nParameters() {return 1;};
 
   {
   public:
     virtual ~GreedyAOptimality(){};
-    int setParameters(const vectord &params) { return 0; };
+    void setParameters(const vectord &params) {};
     size_t nParameters() {return 0;};
     double operator()( const vectord &x)
     { return -mProc->prediction(x)->getStd(); };
   {
   public:
     virtual ~ExpectedReturn(){};
-    int setParameters(const vectord &params) { return 0; };
+    void setParameters(const vectord &params) { };
     size_t nParameters() {return 0;};
     double operator()( const vectord &x)
     { return mProc->prediction(x)->getMean(); };
   public:
     OptimisticSampling() {};
     virtual ~OptimisticSampling(){};
-    int setParameters(const vectord &params) { return 0; };
+    void setParameters(const vectord &params) {};
     size_t nParameters() {return 0;};
     double operator()( const vectord &x)
     {
   public:
     ThompsonSampling() {};
     virtual ~ThompsonSampling(){};
-    int setParameters(const vectord &params) { return 0; };
+    void setParameters(const vectord &params) { };
     size_t nParameters() {return 0;};
     double operator()( const vectord &x)
     {
       reset();
     };
 
-    int setParameters(const vectord &params)
-    {
-      mExp = static_cast<size_t>(params(0));
-      return 0;
-    };
+    void setParameters(const vectord &params)
+    { mExp = static_cast<size_t>(params(0)); };
 
     size_t nParameters() {return 1;};
     void reset() { nCalls = 0; mExp = 10;};
       reset();
     };
 
-    int setParameters(const vectord &params)
-    {
-      mCoef = params(0);
-      return 0;
-    };
+    void setParameters(const vectord &params)
+    { mCoef = params(0); };
+
     size_t nParameters() {return 1;};
     void reset() { nCalls = 0; mCoef = 5.0;};
     double operator()( const vectord &x)
     unsigned int nCalls;
   };
 
+
   /**
    * \brief Distance in input space. Can be combined with other
    * critera to trade off large changes in input space.
       mW = 1;
     };
     virtual ~InputDistance(){};
-    int setParameters(const vectord &params)
-    {
-      mW = params(0);
-      return 0;
-    };
+    void setParameters(const vectord &params)
+    { mW = params(0); };
     size_t nParameters() {return 1;};
  
     double operator()(const vectord &x)