class_docstr: !
  @brief Class represents clustering algorithm SyncNet. 
  @details SyncNet is bio-inspired algorithm that is based on oscillatory network that uses modified Kuramoto model. Each attribute of a data object
           is considered as a phase oscillator.
  
  Example:
  @code
      from pyclustering.cluster import cluster_visualizer
      from pyclustering.cluster.syncnet import syncnet, solve_type
      from pyclustering.samples.definitions import SIMPLE_SAMPLES
      from pyclustering.utils import read_sample
  
      # Read sample for clustering from some file.
      sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE3)
  
      # Create oscillatory network with connectivity radius 1.0.
      network = syncnet(sample, 1.0)
  
      # Run cluster analysis and collect output dynamic of the oscillatory network.
      # Network simulation is performed by Runge Kutta 4.
      analyser = network.process(0.998, solve_type.RK4)
  
      # Show oscillatory network.
      network.show_network()
  
      # Obtain clustering results.
      clusters = analyser.allocate_clusters()
  
      # Visualize clustering results.
      visualizer = cluster_visualizer()
      visualizer.append_clusters(clusters, sample)
      visualizer.show()
  @endcode
class_docstr_tok: ["!","@","brief","Class","represents","clustering","algorithm","SyncNet",".","@","details","SyncNet","is","bio-inspired","algorithm","that","is","based","on","oscillatory","network","that","uses","modified","Kuramoto","model",".","Each","attribute","of","a","data","object","is","considered","as","a","phase","oscillator",".","Example",":","@","code","from","pyclustering.cluster","import","cluster_visualizer","from","pyclustering.cluster.syncnet","import","syncnet",",","solve_type","from","pyclustering.samples.definitions","import","SIMPLE_SAMPLES","from","pyclustering.utils","import","read_sample","#","Read","sample","for","clustering","from","some","file",".","sample","=","read_sample","(","SIMPLE_SAMPLES.SAMPLE_SIMPLE3",")","#","Create","oscillatory","network","with","connectivity","radius","1.0.","network","=","syncnet","(","sample",",","1.0",")","#","Run","cluster","analysis","and","collect","output","dynamic","of","the","oscillatory","network",".","#","Network","simulation","is","performed","by","Runge","Kutta","4.","analyser","=","network.process","(","0.998",",","solve_type.RK4",")","#","Show","oscillatory","network",".","network.show_network","(",")","#","Obtain","clustering","results",".","clusters","=","analyser.allocate_clusters","(",")","#","Visualize","clustering","results",".","visualizer","=","cluster_visualizer","(",")","visualizer.append_clusters","(","clusters",",","sample",")","visualizer.show","(",")","@","endcode"]
docstr: !
  @brief Create connections between oscillators in line with input radius of connectivity.
  
  @param[in] radius (double): Connectivity radius between oscillators.
docstr_tok: ["!","@","brief","Create","connections","between","oscillators","in","line","with","input","radius","of","connectivity",".","@","param","[","in","]","radius","(","double",")",":","Connectivity","radius","between","oscillators","."]
code: def _create_connections(self, radius):
      """!
      @brief Create connections between oscillators in line with input radius of connectivity.
  
      @param[in] radius (double): Connectivity radius between oscillators.
  
      """
  
      if self._ena_conn_weight is True:
          self._conn_weight = [
              [0] * self._num_osc for _ in range(0, self._num_osc, 1)
          ]
  
      maximum_distance = 0
      minimum_distance = float("inf")
  
      # Create connections
      for i in range(0, self._num_osc, 1):
          for j in range(i + 1, self._num_osc, 1):
              dist = euclidean_distance(
                  self._osc_loc[i], self._osc_loc[j]
              )
  
              if self._ena_conn_weight is True:
                  self._conn_weight[i][j] = dist
                  self._conn_weight[j][i] = dist
  
                  if dist > maximum_distance:
                      maximum_distance = dist
                  if dist < minimum_distance:
                      minimum_distance = dist
  
              if dist <= radius:
                  self.set_connection(i, j)
  
      if self._ena_conn_weight is True:
          multiplier = 1
          subtractor = 0
  
          if maximum_distance != minimum_distance:
              multiplier = maximum_distance - minimum_distance
              subtractor = minimum_distance
  
          for i in range(0, self._num_osc, 1):
              for j in range(i + 1, self._num_osc, 1):
                  value_conn_weight = (
                      self._conn_weight[i][j] - subtractor
                  ) / multiplier
  
                  self._conn_weight[i][j] = value_conn_weight
                  self._conn_weight[j][i] = value_conn_weight
  
imports: import math
  import matplotlib.pyplot
  import matplotlib.animation
  from pyclustering.cluster.encoder import type_encoding
  from pyclustering.cluster import cluster_visualizer
  from pyclustering.core.syncnet_wrapper import syncnet_create_network, syncnet_process, syncnet_destroy_network, syncnet_analyser_destroy
  from pyclustering.core.sync_wrapper import sync_connectivity_matrix
  from pyclustering.core.wrapper import ccore_library
  from pyclustering.nnet.sync import sync_dynamic, sync_network, sync_visualizer
  from pyclustering.nnet import conn_represent, initial_type, conn_type, solve_type
  from pyclustering.utils import euclidean_distance
label_desc: Use image node_id 4 for calling the syncnet obj's underlying member method code with example usage: obj._create_connections(radius) without return types