36 #ifndef SHARK_ALGORITHMS_DIRECT_SEARCH_CROSSENTROPY_H 37 #define SHARK_ALGORITHMS_DIRECT_SEARCH_CROSSENTROPY_H 44 #include <boost/shared_ptr.hpp> 80 virtual std::string
name()
const {
return std::string(
"Default noise of 0"); }
95 virtual std::string
name()
const {
98 return std::string(ss.str());
110 virtual double noiseValue (
int t)
const {
return std::max(m_a + (t * m_b), 0.0); }
111 virtual std::string
name()
const {
112 std::stringstream ss;
113 std::string sign = (m_b < 0.0 ?
" - " :
" + ");
114 ss <<
"z(t) = " << m_a << sign <<
"t * " << std::abs(m_b);
115 return std::string(ss.str());
129 {
return "Cross Entropy Method"; }
156 unsigned int populationSize,
158 RealVector initialSigma
183 RealVector
const&
mean()
const {
220 m_noise = boost::shared_ptr<INoiseType> (noiseType);