void hsyncnet::process(const double order, const solve_type solver, const bool collect_dynamic, hsyncnet_analyser & analyser) { unsigned int number_neighbors = 0; unsigned int current_number_clusters = std::numeric_limits<unsigned int>::max(); double radius = 0.0; double current_time = 0.0; while(current_number_clusters > number_clusters) { create_connections(radius, false); sync_dynamic current_dynamic; simulate_dynamic(order, 0.1, solver, collect_dynamic, current_dynamic); sync_dynamic::const_iterator last_state_dynamic = current_dynamic.cend() - 1; analyser.push_back(*(last_state_dynamic)); hsyncnet_cluster_data clusters; analyser.allocate_sync_ensembles(0.05, clusters); current_number_clusters = clusters.size(); number_neighbors++; if (number_neighbors >= oscillator_locations->size()) { radius = radius * 0.1 + radius; } else { radius = average_neighbor_distance(oscillator_locations, number_neighbors); } } }
void hsyncnet::store_state(sync_network_state & state, hsyncnet_analyser & analyser) { state.m_time = m_time; analyser.push_back(state); m_time += DEFAULT_TIME_STEP; }