class_docstr: !
  @brief Class represents clustering algorithm SYNC-SOM. SYNC-SOM is bio-inspired algorithm that is based on oscillatory network 
         that uses self-organized feature map as the first layer.
         
  Example:
  @code
      # read sample for clustering
      sample = read_sample(file);
      
      # create oscillatory network for cluster analysis where the first layer has 
      # size 10x10 and connectivity radius for objects 1.0.
      network = syncsom(sample, 10, 10, 1.0);
      
      # simulate network (perform cluster analysis) and collect output dynamic
      (dyn_time, dyn_phase) = network.process(True, 0.998);
      
      # obtain encoded clusters
      encoded_clusters = network.get_som_clusters();
      
      # obtain real clusters
      clusters = network.get_clusters();
      
      # show the first layer of the network
      network.show_som_layer();
      
      # show the second layer of the network
      network.show_sync_layer();
  @endcode
class_docstr_tok: ["!","@","brief","Class","represents","clustering","algorithm","SYNC-SOM",".","SYNC-SOM","is","bio-inspired","algorithm","that","is","based","on","oscillatory","network","that","uses","self-organized","feature","map","as","the","first","layer",".","Example",":","@","code","#","read","sample","for","clustering","sample","=","read_sample","(","file",")",";","#","create","oscillatory","network","for","cluster","analysis","where","the","first","layer","has","#","size","10x10","and","connectivity","radius","for","objects","1.0.","network","=","syncsom","(","sample",",","10",",","10",",","1.0",")",";","#","simulate","network","(","perform","cluster","analysis",")","and","collect","output","dynamic","(","dyn_time",",","dyn_phase",")","=","network.process","(","True",",","0.998",")",";","#","obtain","encoded","clusters","encoded_clusters","=","network.get_som_clusters","(",")",";","#","obtain","real","clusters","clusters","=","network.get_clusters","(",")",";","#","show","the","first","layer","of","the","network","network.show_som_layer","(",")",";","#","show","the","second","layer","of","the","network","network.show_sync_layer","(",")",";","@","endcode"]
docstr: !
  @brief Performs simulation of the oscillatory network.
  
  @param[in] collect_dynamic (bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
  @param[in] order (double): Order of process synchronization that should be considered as end of clustering, destributed 0..1.
  
  @return (tuple) Dynamic of oscillatory network. If argument 'collect_dynamic' = True, than return dynamic for the whole simulation time,
          otherwise returns only last values (last step of simulation) of dynamic.
  
  @see get_som_clusters()
  @see get_clusters()
docstr_tok: ["!","@","brief","Performs","simulation","of","the","oscillatory","network",".","@","param","[","in","]","collect_dynamic","(","bool",")",":","If","True","-","returns","whole","dynamic","of","oscillatory","network",",","otherwise","returns","only","last","values","of","dynamics",".","@","param","[","in","]","order","(","double",")",":","Order","of","process","synchronization","that","should","be","considered","as","end","of","clustering",",","destributed","0","..","1",".","@","return","(","tuple",")","Dynamic","of","oscillatory","network",".","If","argument","'collect_dynamic","'","=","True",",","than","return","dynamic","for","the","whole","simulation","time",",","otherwise","returns","only","last","values","(","last","step","of","simulation",")","of","dynamic",".","@","see","get_som_clusters","(",")","@","see","get_clusters","(",")"]
code: def process(self, collect_dynamic=False, order=0.999):
      """!
      @brief Performs simulation of the oscillatory network.
  
      @param[in] collect_dynamic (bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
      @param[in] order (double): Order of process synchronization that should be considered as end of clustering, destributed 0..1.
  
      @return (tuple) Dynamic of oscillatory network. If argument 'collect_dynamic' = True, than return dynamic for the whole simulation time,
              otherwise returns only last values (last step of simulation) of dynamic.
  
      @see get_som_clusters()
      @see get_clusters()
      """
  
      # train self-organization map.
      self._som.train(self._data, 100)
  
      # prepare to build list.
      weights = list()
      self._som_osc_table.clear()  # must be cleared, if it's used before.
      for i in range(self._som.size):
          if self._som.awards[i] > 0:
              weights.append(self._som.weights[i])
              self._som_osc_table.append(i)
  
      # create oscillatory neural network.
      self._sync = self.__create_sync_layer(weights)
      self._analyser = self._sync.process(
          order, collect_dynamic=collect_dynamic
      )
  
      return self._analyser.time, self._analyser.output
  
file_path: pyclustering/pyclustering/cluster/syncsom.py
imports: from pyclustering.cluster.encoder import type_encoding
  from pyclustering.cluster.syncnet import syncnet
  from pyclustering.nnet.som import som, type_conn
  from pyclustering.nnet import initial_type
  from pyclustering.utils import euclidean_distance_square
label_desc: Use image node_id 4 for calling the syncsom obj's underlying member method code with example usage: obj.process(collect_dynamic, order) and returns: self,  self