37 #ifndef SHARK_ALGORITHMS_DIRECT_SEARCH_CMA_H 38 #define SHARK_ALGORITHMS_DIRECT_SEARCH_CMA_H 83 template<
typename Container,
typename Extractor>
84 RealVector
weightedSum(
const Container & container,
const RealVector &
weights,
const Extractor & e ) {
86 RealVector result( m_numberOfVariables, 0. );
88 for( std::size_t j = 0; j < container.size(); j++ )
89 result +=
weights( j ) * e( container[j] );
122 const boost::optional< RealMatrix > & initialCovarianceMatrix = boost::optional< RealMatrix >()
134 m_initSigma = initSigma;
143 RealVector
const&
mean()
const {
154 return m_evolutionPathC;
159 return m_evolutionPathSigma;
171 return m_recombinationType;
178 return m_recombinationType;
191 std::size_t
mu()
const {
203 m_userSetLambda =
true;
232 return max(eigenValues)/
min(eigenValues);
247 std::vector<SearchPointType>
const& points,
248 std::vector<ResultType>
const& functionValues,
255 std::size_t m_numberOfVariables;
257 std::size_t m_lambda;
260 bool m_userSetLambda;
277 RealVector m_weights;
279 RealVector m_evolutionPathC;
280 RealVector m_evolutionPathSigma;
282 std::size_t m_counter;