class_docstr: !
  @brief Model of oscillatory network that uses Landau-Stuart oscillator and Kuramoto model as a synchronization mechanism.
  @details Dynamic of each oscillator in the network is described by following differential Landau-Stuart equation with feedback:
  
  [
  \dot{z}_{i} = (i\omega_{i} + 
  ho^{2}_{i} - |z_{i}|^{2} )z_{i} + rac{1}{N}\sum_{j=0}^{N}k_{ij}(z_{j} - z_{i});
  ]
  
  Where left part of the equation is Landau-Stuart equation and the right is a Kuramoto model for synchronization.
  For solving this equation Runge-Kutta 4 method is used by default.
  
  Example:
  @code
      # Prepare oscillatory network parameters.
      amount_oscillators = 3;
      frequency = 1.0;
      radiuses = [1.0, 2.0, 3.0];
      coupling_strength = 1.0;
      
      # Create oscillatory network
      oscillatory_network = fsync_network(amount_oscillators, frequency, radiuses, coupling_strength);
      
      # Simulate network during 200 steps on 10 time-units of time-axis.
      output_dynamic = oscillatory_network.simulate(200, 10, True);    # True is to collect whole output dynamic.
      
      # Visualize output result
      fsync_visualizer.show_output_dynamic(output_dynamic);
  @endcode
  
  Example of output dynamic of the network:
  @image html fsync_sync_examples.png
class_docstr_tok: ["!","@","brief","Model","of","oscillatory","network","that","uses","Landau-Stuart","oscillator","and","Kuramoto","model","as","a","synchronization","mechanism",".","@","details","Dynamic","of","each","oscillator","in","the","network","is","described","by","following","differential","Landau-Stuart","equation","with","feedback",":","[","\\dot","{","z","}","_","{","i","}","=","(","i\\omega_","{","i","}","+","ho^","{","2","}","_","{","i","}","-","|z_","{","i","}","|^","{","2","}",")","z_","{","i","}","+","rac","{","1","}","{","N","}","\\sum_","{","j=0","}","^","{","N","}","k_","{","ij","}","(","z_","{","j","}","-","z_","{","i","}",")",";","]","Where","left","part","of","the","equation","is","Landau-Stuart","equation","and","the","right","is","a","Kuramoto","model","for","synchronization",".","For","solving","this","equation","Runge-Kutta","4","method","is","used","by","default",".","Example",":","@","code","#","Prepare","oscillatory","network","parameters",".","amount_oscillators","=","3",";","frequency","=","1.0",";","radiuses","=","[","1.0",",","2.0",",","3.0","]",";","coupling_strength","=","1.0",";","#","Create","oscillatory","network","oscillatory_network","=","fsync_network","(","amount_oscillators",",","frequency",",","radiuses",",","coupling_strength",")",";","#","Simulate","network","during","200","steps","on","10","time-units","of","time-axis",".","output_dynamic","=","oscillatory_network.simulate","(","200",",","10",",","True",")",";","#","True","is","to","collect","whole","output","dynamic",".","#","Visualize","output","result","fsync_visualizer.show_output_dynamic","(","output_dynamic",")",";","@","endcode","Example","of","output","dynamic","of","the","network",":","@","image","html","fsync_sync_examples.png"]
docstr: !
  @brief Constructor of oscillatory network based on synchronization Kuramoto model and Landau-Stuart oscillator.
  
  @param[in] num_osc (uint): Amount oscillators in the network.
  @param[in] factor_frequency (double|list): Frequency of oscillators, it can be specified as common value for all oscillators by
              single double value and for each separately by list.
  @param[in] factor_radius (double|list): Radius of oscillators that affects amplitude, it can be specified as common value for all oscillators by
              single double value and for each separately by list.
  @param[in] factor_coupling (double): Coupling strength between oscillators.
  @param[in] type_conn (conn_type): Type of connection between oscillators in the network (all-to-all, grid, bidirectional list, etc.).
  @param[in] representation (conn_represent): Internal representation of connection in the network: matrix or list.
docstr_tok: ["!","@","brief","Constructor","of","oscillatory","network","based","on","synchronization","Kuramoto","model","and","Landau-Stuart","oscillator",".","@","param","[","in","]","num_osc","(","uint",")",":","Amount","oscillators","in","the","network",".","@","param","[","in","]","factor_frequency","(","double|list",")",":","Frequency","of","oscillators",",","it","can","be","specified","as","common","value","for","all","oscillators","by","single","double","value","and","for","each","separately","by","list",".","@","param","[","in","]","factor_radius","(","double|list",")",":","Radius","of","oscillators","that","affects","amplitude",",","it","can","be","specified","as","common","value","for","all","oscillators","by","single","double","value","and","for","each","separately","by","list",".","@","param","[","in","]","factor_coupling","(","double",")",":","Coupling","strength","between","oscillators",".","@","param","[","in","]","type_conn","(","conn_type",")",":","Type","of","connection","between","oscillators","in","the","network","(","all-to-all",",","grid",",","bidirectional","list",",","etc.",")",".","@","param","[","in","]","representation","(","conn_represent",")",":","Internal","representation","of","connection","in","the","network",":","matrix","or","list","."]
code: def __init__(
      self,
      num_osc,
      factor_frequency=1.0,
      factor_radius=1.0,
      factor_coupling=1.0,
      type_conn=conn_type.ALL_TO_ALL,
      representation=conn_represent.MATRIX,
  ):
      """!
      @brief Constructor of oscillatory network based on synchronization Kuramoto model and Landau-Stuart oscillator.
  
      @param[in] num_osc (uint): Amount oscillators in the network.
      @param[in] factor_frequency (double|list): Frequency of oscillators, it can be specified as common value for all oscillators by
                  single double value and for each separately by list.
      @param[in] factor_radius (double|list): Radius of oscillators that affects amplitude, it can be specified as common value for all oscillators by
                  single double value and for each separately by list.
      @param[in] factor_coupling (double): Coupling strength between oscillators.
      @param[in] type_conn (conn_type): Type of connection between oscillators in the network (all-to-all, grid, bidirectional list, etc.).
      @param[in] representation (conn_represent): Internal representation of connection in the network: matrix or list.
  
      """
  
      super().__init__(num_osc, type_conn, representation)
  
      self.__frequency = (
          factor_frequency
          if isinstance(factor_frequency, list)
          else [
              fsync_network.__DEFAULT_FREQUENCY_VALUE * factor_frequency
              for _ in range(num_osc)
          ]
      )
      self.__radius = (
          factor_radius
          if isinstance(factor_radius, list)
          else [
              fsync_network.__DEFAULT_RADIUS_VALUE * factor_radius
              for _ in range(num_osc)
          ]
      )
      self.__coupling_strength = (
          fsync_network.__DEFAULT_COUPLING_STRENGTH * factor_coupling
      )
      self.__properties = [
          self.__oscillator_property(index)
          for index in range(self._num_osc)
      ]
  
      random.seed()
      self.__amplitude = [random.random() for _ in range(num_osc)]
  
imports: import matplotlib.pyplot
  import numpy
  import random
  import pyclustering.utils
  from scipy.integrate import odeint
  from pyclustering.nnet import network, conn_type, conn_represent
label_desc: Use image node_id 1 to create a new fsync_network object from inherited base classes: network with example: obj = fsync_network(num_osc, factor_frequency, factor_radius, factor_coupling, type_conn, representation)