class_docstr: !
  @brief Chaotic neural network based on system of logistic map where clustering phenomenon can be observed.
  @details Here is an example how to perform cluster analysis using chaotic neural network:
  @code
      from pyclustering.cluster import cluster_visualizer
      from pyclustering.samples.definitions import SIMPLE_SAMPLES
      from pyclustering.utils import read_sample
      from pyclustering.nnet.cnn import cnn_network, cnn_visualizer
  
      # Load stimulus from file.
      stimulus = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE3)
  
      # Create chaotic neural network, amount of neurons should be equal to amount of stimulus.
      network_instance = cnn_network(len(stimulus))
  
      # Perform simulation during 100 steps.
      steps = 100
      output_dynamic = network_instance.simulate(steps, stimulus)
  
      # Display output dynamic of the network.
      cnn_visualizer.show_output_dynamic(output_dynamic)
  
      # Display dynamic matrix and observation matrix to show clustering phenomenon.
      cnn_visualizer.show_dynamic_matrix(output_dynamic)
      cnn_visualizer.show_observation_matrix(output_dynamic)
  
      # Visualize clustering results.
      clusters = output_dynamic.allocate_sync_ensembles(10)
      visualizer = cluster_visualizer()
      visualizer.append_clusters(clusters, stimulus)
      visualizer.show()
  @endcode
class_docstr_tok: ["!","@","brief","Chaotic","neural","network","based","on","system","of","logistic","map","where","clustering","phenomenon","can","be","observed",".","@","details","Here","is","an","example","how","to","perform","cluster","analysis","using","chaotic","neural","network",":","@","code","from","pyclustering.cluster","import","cluster_visualizer","from","pyclustering.samples.definitions","import","SIMPLE_SAMPLES","from","pyclustering.utils","import","read_sample","from","pyclustering.nnet.cnn","import","cnn_network",",","cnn_visualizer","#","Load","stimulus","from","file",".","stimulus","=","read_sample","(","SIMPLE_SAMPLES.SAMPLE_SIMPLE3",")","#","Create","chaotic","neural","network",",","amount","of","neurons","should","be","equal","to","amount","of","stimulus",".","network_instance","=","cnn_network","(","len","(","stimulus",")",")","#","Perform","simulation","during","100","steps",".","steps","=","100","output_dynamic","=","network_instance.simulate","(","steps",",","stimulus",")","#","Display","output","dynamic","of","the","network",".","cnn_visualizer.show_output_dynamic","(","output_dynamic",")","#","Display","dynamic","matrix","and","observation","matrix","to","show","clustering","phenomenon",".","cnn_visualizer.show_dynamic_matrix","(","output_dynamic",")","cnn_visualizer.show_observation_matrix","(","output_dynamic",")","#","Visualize","clustering","results",".","clusters","=","output_dynamic.allocate_sync_ensembles","(","10",")","visualizer","=","cluster_visualizer","(",")","visualizer.append_clusters","(","clusters",",","stimulus",")","visualizer.show","(",")","@","endcode"]
docstr: !
  @brief Create weights between neurons in line with stimulus.
  
  @param[in] stimulus (list): External stimulus for the chaotic neural network.
docstr_tok: ["!","@","brief","Create","weights","between","neurons","in","line","with","stimulus",".","@","param","[","in","]","stimulus","(","list",")",":","External","stimulus","for","the","chaotic","neural","network","."]
code: def __create_weights(self, stimulus):
      """!
      @brief Create weights between neurons in line with stimulus.
  
      @param[in] stimulus (list): External stimulus for the chaotic neural network.
  
      """
  
      self.__average_distance = average_neighbor_distance(
          stimulus, self.__amount_neighbors
      )
  
      self.__weights = [
          [0.0 for _ in range(len(stimulus))]
          for _ in range(len(stimulus))
      ]
      self.__weights_summary = [0.0 for _ in range(self.__num_osc)]
  
      if self.__conn_type == type_conn.ALL_TO_ALL:
          self.__create_weights_all_to_all(stimulus)
  
      elif self.__conn_type == type_conn.TRIANGULATION_DELAUNAY:
          self.__create_weights_delaunay_triangulation(stimulus)
  
imports: import math
  import numpy
  import random
  import matplotlib.pyplot
  from matplotlib import rcParams
  from matplotlib.font_manager import FontProperties
  from mpl_toolkits.mplot3d import Axes3D
  from enum import IntEnum
  from scipy.spatial import Delaunay
  from pyclustering.utils import euclidean_distance_square, average_neighbor_distance, heaviside, draw_dynamics
label_desc: Use image node_id 6 for calling the cnn_network obj's underlying member method code with example usage: obj.__create_weights(stimulus) without return types