25namespace NeighborhoodFunc {
29 double iter_factor = 1.0 *
static_cast<double>(total_iterations - iteration) /
static_cast<double>(total_iterations);
30 iter_factor = iter_factor * iter_factor;
31 auto x =
static_cast<double>(bmu.first - cell.first);
32 auto y =
static_cast<double>(bmu.second - cell.second);
33 double dist_square = x * x + y * y;
42 : m_init_sigma(static_cast<double>(
std::max(x_size, y_size)) / 2.)
43 , m_sigma_log(
std::log(m_init_sigma))
44 , m_cutoff_mult_square{sigma_cutoff_mult * sigma_cutoff_mult} {}
Kohonen(std::size_t x_size, std::size_t y_size, double sigma_cutoff_mult)
double operator()(std::pair< std::size_t, std::size_t > bmu, std::pair< std::size_t, std::size_t > cell, std::size_t iteration, std::size_t total_iterations)