Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Benazera committed Jan 8, 2015
2 parents fe3d714 + cdb3690 commit 3336d03
Show file tree
Hide file tree
Showing 35 changed files with 406 additions and 55 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-01-08 Emmanuel Benazera <emmanuel.benazera at inria.fr>
* libcmaes v0.9.4
- work around clang bug, now working with clang, ref #19
- easier build on OSX
- added uncertainty handling scheme for noisy objective functions, ref #65
- optional support for surrogates at compile time, reducing the overal lib size, ref #90
- fixed uninstall of python bindings

2014-11-17 Emmanuel Benazera <emmanuel.benazera at inria.fr>
* libcmaes v0.9.3:
- full support for surrogates, allowing optimization of costly objective functions, ref #57
Expand Down
20 changes: 17 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# configure for libcmaes
# author
AC_INIT(libcmaes,0.9.3)
AC_INIT(libcmaes,0.9.4)
AC_CONFIG_SRCDIR(Makefile.am)
AM_INIT_AUTOMAKE([subdir-objects])
AM_CONFIG_HEADER([libcmaes_config.h])
Expand All @@ -13,8 +13,9 @@ AC_CONFIG_FILES(libcmaes.pc)
AC_PROG_INSTALL
AC_CANONICAL_HOST

AC_PROG_CC(g++ c++) # force c++ compiler on C files, otherwise BBOB lib doesn't link properly
AC_PROG_CXX
AC_PROG_CC(clang++ g++ c++) # force c++ compiler on C files, otherwise BBOB lib doesn't link properly
AC_PROG_CXX(clang++ g++ c++)
AM_CONDITIONAL(HAVE_CLANG, test x"$CXX" = xclang++)
AC_PROG_INSTALL
AC_PROG_LIBTOOL

Expand Down Expand Up @@ -137,6 +138,19 @@ AC_HELP_STRING([--enable-onlylib],[Compile the library alone without tests and e
esac],[onlylib=false])
AM_CONDITIONAL(HAVE_ONLYLIB, test x$onlylib = xtrue)

# Whether to compile support for surrogates
AC_ARG_ENABLE(surrog,
AC_HELP_STRING([--enable-surrog],[Compile the library with support for surrogates (default is YES)]),
[case "${enableval}" in
yes) surrog=true ;;
no) surrog=false ;;
*) AC_MSG_ERROR(bad_value ${enableval} for --enable-surrog) ;;
esac],[surrog=true])
AM_CONDITIONAL(HAVE_SURROG, test x$surrog = xtrue)
if test x"$surrog" = x"true"; then
AC_DEFINE(HAVE_SURROG, 1, [surrog])
fi

# Whether debug mode
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[Enable debug mode (default is NO)]),
Expand Down
18 changes: 14 additions & 4 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bin_PROGRAMS=sample_code sample_code_genopheno sample_code_pfunc sample_code_ask_tell sample_code_bounds sample_code_gradient sample_code_lscaling sample_code_lscaling_sigmas lorentzpeakbench sample_code_pffunc sample_code_surrogate1 sample_code_simple_surrogate_rsvm sample_code_surrogate_rsvm test_rsvm
bin_PROGRAMS=sample_code sample_code_genopheno sample_code_pfunc sample_code_ask_tell sample_code_bounds sample_code_gradient sample_code_lscaling sample_code_lscaling_sigmas sample_code_pffunc
sample_code_SOURCES=sample-code.cc
sample_code_genopheno_SOURCES=sample-code-genopheno.cc
sample_code_pfunc_SOURCES=sample-code-pfunc.cc
Expand All @@ -8,17 +8,27 @@ sample_code_gradient_SOURCES=sample-code-gradient.cc
sample_code_lscaling_SOURCES=sample-code-lscaling.cc
sample_code_lscaling_sigmas_SOURCES=sample-code-lscaling-sigmas.cc
sample_code_pffunc_SOURCES=sample-code-pffunc.cc

if HAVE_SURROG
bin_PROGRAMS += sample_code_surrogate1 test_rsvm
sample_code_surrogate1_SOURCES=surrogates/sample-code-surrogate1.cc
sample_code_simple_surrogate_rsvm_SOURCES=surrogates/sample-code-simple-surrogate-rsvm.cc
sample_code_surrogate_rsvm_SOURCES=surrogates/sample-code-surrogate-rsvm.cc
test_rsvm_SOURCES=surrogates/test-rsvm.cc
endif

if HAVE_GFLAGS
bin_PROGRAMS += lorentzpeakbench
lorentzpeakbench_SOURCES=lorentzpeakbench.cc
if HAVE_SURROG
bin_PROGRAMS += sample_code_simple_surrogate_rsvm sample_code_surrogate_rsvm
sample_code_simple_surrogate_rsvm_SOURCES=surrogates/sample-code-simple-surrogate-rsvm.cc
sample_code_surrogate_rsvm_SOURCES=surrogates/sample-code-surrogate-rsvm.cc
endif
endif

AM_CPPFLAGS=-I../src/ -I$(EIGEN3_INC)
AM_CXXFLAGS=-g -Wall -fopenmp
AM_CXXFLAGS=-g -Wall
if !HAVE_CLANG
AM_CXXFLAGS+=-fopenmp
endif
AM_LDFLAGS=-L../src
LDADD=-lcmaes -lm $(GLOG_LIBS) $(GFLAGS_LIBS)
2 changes: 1 addition & 1 deletion examples/sample-code-ask-tell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int main(int argc, char *argv[])
std::vector<double> x0(dim,10.0);
double sigma = 0.1;

CMAParameters<> cmaparams(dim,&x0.front(),sigma);
CMAParameters<> cmaparams(x0,sigma);
//ESOptimizer<CMAStrategy<CovarianceUpdate>,CMAParameters<>> optim(fsphere,cmaparams);
ESOptimizer<customCMAStrategy,CMAParameters<>> optim(fsphere,cmaparams);

Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-bounds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int main(int argc, char *argv[])
}
std::vector<double> x0(dim,1.0); // beware that x0 is within bounds.
GenoPheno<pwqBoundStrategy> gp(lbounds,ubounds,dim); // genotype / phenotype transform associated to bounds.
CMAParameters<GenoPheno<pwqBoundStrategy>> cmaparams(dim,&x0.front(),sigma,-1,0,gp); // -1 for automatically decided lambda, 0 is for random seeding of the internal generator.
CMAParameters<GenoPheno<pwqBoundStrategy>> cmaparams(x0,sigma,-1,0,gp); // -1 for automatically decided lambda, 0 is for random seeding of the internal generator.
cmaparams.set_algo(aCMAES);
CMASolutions cmasols = cmaes<GenoPheno<pwqBoundStrategy>>(fsphere,cmaparams);
std::cout << "best solution: " << cmasols << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-genopheno.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char *argv[])
double sigma = 0.1;
//int lambda = 100; // offsprings at each generation.
GenoPheno<> gp(genof,phenof);
CMAParameters<> cmaparams(dim,&x0.front(),sigma,-1,0,gp); // -1 for automatically decided lambda.
CMAParameters<> cmaparams(x0,sigma,-1,0,gp); // -1 for automatically decided lambda.
//cmaparams._algo = BIPOP_CMAES;
CMASolutions cmasols = cmaes<>(fsphere,cmaparams);
std::cout << "best solution: " << cmasols << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-gradient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(int argc, char *argv[])
std::vector<double> x0(dim,10.0);
double sigma = 0.1;
//int lambda = 100; // offsprings at each generation.
CMAParameters<> cmaparams(dim,&x0.front(),sigma);
CMAParameters<> cmaparams(x0,sigma);
cmaparams.set_algo(aCMAES);
CMASolutions cmasols = cmaes<>(fsphere,cmaparams,
CMAStrategy<CovarianceUpdate>::_defaultPFunc, // use default progress function
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-lscaling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int main(int argc, char *argv[])
ubounds[i] = 2.0;
}
GenoPheno<pwqBoundStrategy,linScalingStrategy> gp(lbounds,ubounds,dim);
CMAParameters<GenoPheno<pwqBoundStrategy,linScalingStrategy>> cmaparams(dim,&x0.front(),sigma,-1,0,gp); // -1 for automatically decided lambda.
CMAParameters<GenoPheno<pwqBoundStrategy,linScalingStrategy>> cmaparams(x0,sigma,-1,0,gp); // -1 for automatically decided lambda.
cmaparams.set_algo(aCMAES);
CMASolutions cmasols = cmaes<GenoPheno<pwqBoundStrategy,linScalingStrategy>>(fsphere,cmaparams);
std::cout << "best solution: " << cmasols << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-pffunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(int argc, char *argv[])
std::vector<double> x0(dim,10.0);
double sigma = 0.1;
//int lambda = 100; // offsprings at each generation.
CMAParameters<> cmaparams(dim,&x0.front(),sigma);
CMAParameters<> cmaparams(x0,sigma);
cmaparams.set_fplot("pffunc.dat"); // DON'T MISS: mandatory output file name.
CMASolutions cmasols = cmaes<>(rosenbrock,cmaparams,CMAStrategy<CovarianceUpdate>::_defaultPFunc,nullptr,cmasols,plotf);
std::cout << "best solution: " << cmasols << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-pfunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main(int argc, char *argv[])
std::vector<double> x0(dim,10.0);
double sigma = 0.1;
//int lambda = 100; // offsprings at each generation.
CMAParameters<> cmaparams(dim,&x0.front(),sigma);
CMAParameters<> cmaparams(x0,sigma);
//cmaparams._algo = BIPOP_CMAES;
CMASolutions cmasols = cmaes<>(rosenbrock,cmaparams,select_time);
std::cout << "best solution: " << cmasols << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(int argc, char *argv[])
std::vector<double> x0(dim,10.0);
double sigma = 0.1;
//int lambda = 100; // offsprings at each generation.
CMAParameters<> cmaparams(dim,&x0.front(),sigma);
CMAParameters<> cmaparams(x0,sigma);
//cmaparams._algo = BIPOP_CMAES;
CMASolutions cmasols = cmaes<>(fsphere,cmaparams);
std::cout << "best solution: " << cmasols << std::endl;
Expand Down
Empty file removed examples/surrogates/.dirstamp
Empty file.
7 changes: 4 additions & 3 deletions examples/surrogates/sample-code-simple-surrogate-rsvm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ template<class TCovarianceUpdate=CovarianceUpdate,class TGenoPheno=GenoPheno<NoB
_rsvm._encode = true;
_rsvm.train(x,_rsvm_iter,cov,xmean);

this->set_train_error(this->compute_error(cp,
eostrat<TGenoPheno>::get_solutions().csqinv()));

dMat cinv = eostrat<TGenoPheno>::get_solutions().csqinv();
//this->set_train_error(this->compute_error(cp,cinv)); // clang doesn't like this call within a lambda...
this->set_train_error(_rsvm.error(x,x,fvalues,cinv,xmean));

//debug
//std::cout << "training error=" << _rsvm.error(x,x,fvalues,cov,xmean) << std::endl;
//std::cout << "train error=" << this->get_train_error() << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/surrogates/sample-code-surrogate1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char *argv[])
std::vector<double> x0(dim,10.0);
double sigma = 0.1;

CMAParameters<> cmaparams(dim,&x0.front(),sigma);
CMAParameters<> cmaparams(x0,sigma);
ESOptimizer<SimpleSurrogateStrategy<CMAStrategy>,CMAParameters<>> optim(fsphere,cmaparams);
optim.set_ftrain(ftrain);
optim.set_fpredict(fpredict);
Expand Down
6 changes: 6 additions & 0 deletions python/lcmaes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
*/

#include "cmaes.h"
#ifdef HAVE_SURROG
#include "surrogatestrategy.h"
#endif
using namespace libcmaes;

#include <boost/python.hpp>
Expand Down Expand Up @@ -138,6 +140,7 @@ GenoPheno<TBoundStrategy,TScalingStrategy> make_genopheno(const boost::python::l
return GenoPheno<TBoundStrategy,TScalingStrategy>(&vlbounds.front(),&vubounds.front(),dim);
}

#ifdef HAVE_SURROG
/* wrapper to surrogate cmaes high level function. */
int csurrfunc_f(const boost::python::list &candidates, boost::python::object &pyArray)
{
Expand Down Expand Up @@ -199,6 +202,7 @@ template <class TGenoPheno=GenoPheno<NoBoundStrategy>>
optim.optimize();
return optim.get_solutions();
}
#endif

BOOST_PYTHON_MODULE(lcmaes)
{
Expand Down Expand Up @@ -401,6 +405,7 @@ BOOST_PYTHON_MODULE(lcmaes)
def("pcmaes_pwqb_ls",pcmaes<GenoPheno<pwqBoundStrategy,linScalingStrategy>>,args("fitfunc","parameters"));


#ifdef HAVE_SURROG
/*- surrogates -*/
def_function<int(const boost::python::list&,boost::python::object&)>("csurrfunc_pbf","training function for python");
scope().attr("csurrfunc_bf") = csurrfunc_bf;
Expand All @@ -411,5 +416,6 @@ BOOST_PYTHON_MODULE(lcmaes)
def("surrpcmaes_pwqb",surrpcmaes<GenoPheno<pwqBoundStrategy>>,args("fitfunc","trainfunc","predictfunc","parameters","exploit","l"));
def("surrpcmaes_ls",surrpcmaes<GenoPheno<NoBoundStrategy,linScalingStrategy>>,args("fitfunc","trainfunc","predictfunc","parameters","exploit","l"));
def("surrpcmaes_pwqb_ls",surrpcmaes<GenoPheno<pwqBoundStrategy,linScalingStrategy>>,args("fitfunc","trainfunc","predictfunc","parameters","exploit","l"));
#endif

} // end boost
12 changes: 6 additions & 6 deletions python/ptest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# input parameters for a 10-D problem
x = [10]*10
olambda = 10 # lambda is a reserved keyword in python, using olambda instead.
lambda_ = 10 # lambda is a reserved keyword in python, using lambda_ instead.
seed = 0 # 0 for seed auto-generated within the lib.
sigma = 0.1
p = lcmaes.make_simple_parameters(x,sigma,olambda,seed)
p = lcmaes.make_simple_parameters(x,sigma,lambda_,seed)
p.set_str_algo("acmaes")

# objective function.
Expand All @@ -24,8 +24,8 @@ def nfitfunc(x,n):
# collect and inspect results
bcand = cmasols.best_candidate()
bx = lcmaes.get_candidate_x(bcand)
print "best x=",bx
print "distribution mean=",lcmaes.get_solution_xmean(cmasols)
print("best x=",bx)
print("distribution mean=",lcmaes.get_solution_xmean(cmasols))
cov = lcmaes.get_solution_cov(cmasols) # numpy array
print "cov=",cov
print "elapsed time=",cmasols.elapsed_time(),"ms"
print("cov=",cov)
print("elapsed time=",cmasols.elapsed_time(),"ms")
12 changes: 6 additions & 6 deletions python/ptest_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

# input parameters for a 10-D problem
x = [3]*10
olambda = 10 # lambda is a reserved keyword in python, using olambda instead.
lambda_ = 10 # lambda is a reserved keyword in python, using lambda_ instead.
seed = 0 # 0 for seed auto-generated within the lib.
sigma = 0.1
lbounds = [-4]*10
ubounds = [4]*10
gp = lcmaes.make_genopheno_pwqb(lbounds,ubounds,10)
p = lcmaes.make_parameters_pwqb(x,sigma,olambda,seed,gp)
p = lcmaes.make_parameters_pwqb(x,sigma,lambda_,seed,gp)

# objective function.
def nfitfunc(x,n):
Expand All @@ -26,8 +26,8 @@ def nfitfunc(x,n):
# collect and inspect results
bcand = cmasols.best_candidate()
bx = lcmaes.get_candidate_x(bcand)
print "best x=",bx
print "distribution mean=",lcmaes.get_solution_xmean(cmasols)
print("best x=",bx)
print("distribution mean=",lcmaes.get_solution_xmean(cmasols))
cov = lcmaes.get_solution_cov(cmasols) # numpy array
print "cov=",cov
print "elapsed time=",cmasols.elapsed_time(),"ms"
print("cov=",cov)
print("elapsed time=",cmasols.elapsed_time(),"ms")
10 changes: 5 additions & 5 deletions python/surrptest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
x0 = 2
dim = 10
x = [x0]*dim
olambda = 10 # lambda is a reserved keyword in python, using olambda instead.
lambda_ = 10 # lambda is a reserved keyword in python, using lambda_ instead.
seed = 0 # 0 for seed auto-generated within the lib.
sigma = 0.1
p = lcmaes.make_simple_parameters(x,sigma,olambda,seed)
p = lcmaes.make_simple_parameters(x,sigma,lambda_,seed)
p.set_str_algo("cmaes")
#p.set_max_iter(20)
p.set_ftarget(1e-3)
Expand Down Expand Up @@ -101,8 +101,8 @@ def nsurrfunc(c,m):
# collect and inspect results
bcand = cmasols.best_candidate()
bx = lcmaes.get_candidate_x(bcand)
print "best x=",bx," / fevals=",cmasols.fevals()
print "distribution mean=",lcmaes.get_solution_xmean(cmasols)
print("best x=",bx," / fevals=",cmasols.fevals())
print("distribution mean=",lcmaes.get_solution_xmean(cmasols))
cov = lcmaes.get_solution_cov(cmasols) # numpy array
#print "cov=",cov
print "elapsed time=",cmasols.elapsed_time(),"ms"
print("elapsed time=",cmasols.elapsed_time(),"ms")
14 changes: 11 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ libcmaesdatadir = $(datadir)
libcmaesincludedir = $(includedir)/libcmaes

libcmaes_LTLIBRARIES=libcmaes.la
libcmaes_la_SOURCES=libcmaes_config.h cmaes.h eo_matrix.h cmastrategy.cc esoptimizer.h esostrategy.h esostrategy.cc cmasolutions.h cmasolutions.cc parameters.h cmaparameters.h cmaparameters.cc cmastopcriteria.h cmastopcriteria.cc ipopcmastrategy.h ipopcmastrategy.cc bipopcmastrategy.h bipopcmastrategy.cc covarianceupdate.h covarianceupdate.cc acovarianceupdate.h acovarianceupdate.cc vdcmaupdate.h vdcmaupdate.cc pwq_bound_strategy.h pwq_bound_strategy.cc eigenmvn.h candidate.h genopheno.h noboundstrategy.h scaling.h llogging.h surrogatestrategy.cc surrogatestrategy.h surrogates/rankingsvm.hpp surrogates/surr_rsvm_strategy.hpp pli.h errstats.cc errstats.h contour.h
libcmaes_la_SOURCES=libcmaes_config.h cmaes.h eo_matrix.h cmastrategy.cc esoptimizer.h esostrategy.h esostrategy.cc cmasolutions.h cmasolutions.cc parameters.h cmaparameters.h cmaparameters.cc cmastopcriteria.h cmastopcriteria.cc ipopcmastrategy.h ipopcmastrategy.cc bipopcmastrategy.h bipopcmastrategy.cc covarianceupdate.h covarianceupdate.cc acovarianceupdate.h acovarianceupdate.cc vdcmaupdate.h vdcmaupdate.cc pwq_bound_strategy.h pwq_bound_strategy.cc eigenmvn.h candidate.h genopheno.h noboundstrategy.h scaling.h llogging.h pli.h errstats.cc errstats.h contour.h

libcmaesinclude_HEADERS = cmaes.h eo_matrix.h cmastrategy.h esoptimizer.h esostrategy.h cmasolutions.h parameters.h cmaparameters.h cmastopcriteria.h ipopcmastrategy.h bipopcmastrategy.h covarianceupdate.h acovarianceupdate.h vdcmaupdate.h pwq_bound_strategy.h eigenmvn.h candidate.h genopheno.h noboundstrategy.h scaling.h llogging.h surrogatestrategy.h errstats.h pli.h contour.h
libcmaesinclude_HEADERS = cmaes.h eo_matrix.h cmastrategy.h esoptimizer.h esostrategy.h cmasolutions.h parameters.h cmaparameters.h cmastopcriteria.h ipopcmastrategy.h bipopcmastrategy.h covarianceupdate.h acovarianceupdate.h vdcmaupdate.h pwq_bound_strategy.h eigenmvn.h candidate.h genopheno.h noboundstrategy.h scaling.h llogging.h errstats.h pli.h contour.h

if HAVE_SURROG
libcmaes_la_SOURCES += surrogatestrategy.cc surrogatestrategy.h surrogates/rankingsvm.hpp surrogates/surr_rsvm_strategy.hpp
libcmaesinclude_HEADERS += surrogatestrategy.h
endif

AM_CPPFLAGS=-I$(EIGEN3_INC)
AM_CXXFLAGS=-Wall -Wextra -g -fopenmp
AM_CXXFLAGS=-Wall -Wextra -g
if !HAVE_CLANG
AM_CXXFLAGS += -fopenmp
endif

uninstall-hook:
if test -d ${libcmaesincludedir}; then rm -rf ${libcmaesincludedir}; fi
17 changes: 17 additions & 0 deletions src/candidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,23 @@ namespace libcmaes
dVec _x; /**< function parameter vector. */
};

class RankedCandidate : public Candidate
{
public:
RankedCandidate(const double &fvalue_mut,
Candidate &c,
const int &idx)
:Candidate(c.get_fvalue(),dVec()),_idx(idx),_fvalue_mut(fvalue_mut)
{}
~RankedCandidate() {}

int _idx = -1;
double _fvalue_mut;
int _r1 = 0;
int _r2 = 0;
double _delta = 0.0;
};

}

#endif
4 changes: 4 additions & 0 deletions src/cmaparameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ namespace libcmaes

// active cma.
_deltamaxsigma = std::numeric_limits<double>::max();

// uncertainty handling.
this->_rlambda = std::max(0.1,2.0/Parameters<TGenoPheno>::_lambda);
this->_alphathuh = 1 + 2.0/(Parameters<TGenoPheno>::_dim+10.0);
}

template <class TGenoPheno>
Expand Down
6 changes: 6 additions & 0 deletions src/cmasolutions.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ namespace libcmaes
friend class CovarianceUpdate;
friend class ACovarianceUpdate;
template <class U> friend class errstats;
#ifdef HAVE_SURROG
template <template <class X,class Y> class U, class V, class W> friend class SimpleSurrogateStrategy;
template <template <class X,class Y> class U, class V, class W> friend class ACMSurrogateStrategy;
#endif
friend class VDCMAUpdate;

public:
Expand Down Expand Up @@ -429,6 +431,10 @@ namespace libcmaes
Candidate _initial_candidate;

dVec _v; /**< complementary vector for use in vdcma. */

std::vector<RankedCandidate> _candidates_uh; /**< temporary set of candidates used by uncertainty handling scheme. */
int _lambda_reev; /**< number of reevaluated solutions at current step. */
double _suh; /**< uncertainty level computed by uncertainty handling procedure. */
};

std::ostream& operator<<(std::ostream &out,const CMASolutions &cmas);
Expand Down
Loading

0 comments on commit 3336d03

Please sign in to comment.