class_docstr: !
  @brief Oscillatory Neural Network with central element based on Hodgkin-Huxley neuron model.
  @details Interaction between oscillators is performed via central element (no connection between oscillators that
            are called as peripheral). Peripheral oscillators receive external stimulus. Central element consist of
            two oscillators: the first is used for synchronization some ensemble of oscillators and the second
            controls synchronization of the first central oscillator with various ensembles.
  
  Usage example where oscillatory network with 6 oscillators is used for simulation. The first two oscillators
  have the same stimulus, as well as the third and fourth oscillators and the last two. Thus three synchronous
  ensembles are expected after simulation.
  @code
      from pyclustering.nnet.hhn import hhn_network, hhn_parameters
      from pyclustering.nnet.dynamic_visualizer import dynamic_visualizer
  
      # Change period of time when high strength value of synaptic connection exists from CN2 to PN.
      params = hhn_parameters()
      params.deltah = 400
  
      # Create Hodgkin-Huxley oscillatory network with stimulus.
      net = hhn_network(6, [0, 0, 25, 25, 47, 47], params)
  
      # Simulate network.
      (t, dyn_peripheral, dyn_central) = net.simulate(2400, 600)
  
      # Visualize network's output (membrane potential of peripheral and central neurons).
      amount_canvases = 6 + 2  # 6 peripheral oscillator + 2 central elements
      visualizer = dynamic_visualizer(amount_canvases, x_title="Time", y_title="V", y_labels=False)
      visualizer.append_dynamics(t, dyn_peripheral, 0, True)
      visualizer.append_dynamics(t, dyn_central, amount_canvases - 2, True)
      visualizer.show()
  @endcode
  
  There is visualized result of simulation where three synchronous ensembles of oscillators can be observed. The
  first and the second oscillators form the first ensemble, the third and the fourth form the second ensemble and
  the last two oscillators form the third ensemble.
  @image html hhn_three_ensembles.png
class_docstr_tok: ["!","@","brief","Oscillatory","Neural","Network","with","central","element","based","on","Hodgkin-Huxley","neuron","model",".","@","details","Interaction","between","oscillators","is","performed","via","central","element","(","no","connection","between","oscillators","that","are","called","as","peripheral",")",".","Peripheral","oscillators","receive","external","stimulus",".","Central","element","consist","of","two","oscillators",":","the","first","is","used","for","synchronization","some","ensemble","of","oscillators","and","the","second","controls","synchronization","of","the","first","central","oscillator","with","various","ensembles",".","Usage","example","where","oscillatory","network","with","6","oscillators","is","used","for","simulation",".","The","first","two","oscillators","have","the","same","stimulus",",","as","well","as","the","third","and","fourth","oscillators","and","the","last","two",".","Thus","three","synchronous","ensembles","are","expected","after","simulation",".","@","code","from","pyclustering.nnet.hhn","import","hhn_network",",","hhn_parameters","from","pyclustering.nnet.dynamic_visualizer","import","dynamic_visualizer","#","Change","period","of","time","when","high","strength","value","of","synaptic","connection","exists","from","CN2","to","PN",".","params","=","hhn_parameters","(",")","params.deltah","=","400","#","Create","Hodgkin-Huxley","oscillatory","network","with","stimulus",".","net","=","hhn_network","(","6",",","[","0",",","0",",","25",",","25",",","47",",","47","]",",","params",")","#","Simulate","network",".","(","t",",","dyn_peripheral",",","dyn_central",")","=","net.simulate","(","2400",",","600",")","#","Visualize","network","'s","output","(","membrane","potential","of","peripheral","and","central","neurons",")",".","amount_canvases","=","6","+","2","#","6","peripheral","oscillator","+","2","central","elements","visualizer","=","dynamic_visualizer","(","amount_canvases",",","x_title=","''","Time","''",",","y_title=","''","V","''",",","y_labels=False",")","visualizer.append_dynamics","(","t",",","dyn_peripheral",",","0",",","True",")","visualizer.append_dynamics","(","t",",","dyn_central",",","amount_canvases","-","2",",","True",")","visualizer.show","(",")","@","endcode","There","is","visualized","result","of","simulation","where","three","synchronous","ensembles","of","oscillators","can","be","observed",".","The","first","and","the","second","oscillators","form","the","first","ensemble",",","the","third","and","the","fourth","form","the","second","ensemble","and","the","last","two","oscillators","form","the","third","ensemble",".","@","image","html","hhn_three_ensembles.png"]
docstr: !
  @brief Calculates value of alfa-function for difference between spike generation time and current simulation time.
  
  @param[in] time (double): Difference between last spike generation time and current time.
  @param[in] alfa (double): Alfa parameter for alfa-function.
  @param[in] betta (double): Betta parameter for alfa-function.
  
  @return (double) Value of alfa-function.
docstr_tok: ["!","@","brief","Calculates","value","of","alfa-function","for","difference","between","spike","generation","time","and","current","simulation","time",".","@","param","[","in","]","time","(","double",")",":","Difference","between","last","spike","generation","time","and","current","time",".","@","param","[","in","]","alfa","(","double",")",":","Alfa","parameter","for","alfa-function",".","@","param","[","in","]","betta","(","double",")",":","Betta","parameter","for","alfa-function",".","@","return","(","double",")","Value","of","alfa-function","."]
code: def __alfa_function(self, time, alfa, betta):
      """!
      @brief Calculates value of alfa-function for difference between spike generation time and current simulation time.
  
      @param[in] time (double): Difference between last spike generation time and current time.
      @param[in] alfa (double): Alfa parameter for alfa-function.
      @param[in] betta (double): Betta parameter for alfa-function.
  
      @return (double) Value of alfa-function.
  
      """
  
      return alfa * time * math.exp(-betta * time)
  
imports: from scipy.integrate import odeint
  from pyclustering.core.wrapper import ccore_library
  import pyclustering.core.hhn_wrapper
  from pyclustering.nnet import *
  from pyclustering.utils import allocate_sync_ensembles
  import numpy
  import random
label_desc: Use image node_id 10 for calling the hhn_network obj's underlying member method code with example usage: obj.__alfa_function(time, alfa, betta) and returns: unknown