class_docstr: !
  @brief Common network description that consists of information about oscillators and connection between them.
class_docstr_tok: ["!","@","brief","Common","network","description","that","consists","of","information","about","oscillators","and","connection","between","them","."]
docstr: !
  @brief Constructor of the network.
  
  @param[in] num_osc (uint): Number of oscillators in the network that defines size of the network.
  @param[in] type_conn (conn_type): Type of connections that are used in the network between oscillators.
  @param[in] conn_repr (conn_represent): Type of representation of connections.
  @param[in] height (uint): Number of oscillators in column of the network, this argument is used 
              only for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored.
  @param[in] width (uint): Number of oscillotors in row of the network, this argument is used only 
              for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored.
docstr_tok: ["!","@","brief","Constructor","of","the","network",".","@","param","[","in","]","num_osc","(","uint",")",":","Number","of","oscillators","in","the","network","that","defines","size","of","the","network",".","@","param","[","in","]","type_conn","(","conn_type",")",":","Type","of","connections","that","are","used","in","the","network","between","oscillators",".","@","param","[","in","]","conn_repr","(","conn_represent",")",":","Type","of","representation","of","connections",".","@","param","[","in","]","height","(","uint",")",":","Number","of","oscillators","in","column","of","the","network",",","this","argument","is","used","only","for","network","with","grid","structure","(","GRID_FOUR",",","GRID_EIGHT",")",",","for","other","types","this","argument","is","ignored",".","@","param","[","in","]","width","(","uint",")",":","Number","of","oscillotors","in","row","of","the","network",",","this","argument","is","used","only","for","network","with","grid","structure","(","GRID_FOUR",",","GRID_EIGHT",")",",","for","other","types","this","argument","is","ignored","."]
code: def __init__(
      self,
      num_osc,
      type_conn=conn_type.ALL_TO_ALL,
      conn_repr=conn_represent.MATRIX,
      height=None,
      width=None,
  ):
      """!
      @brief Constructor of the network.
  
      @param[in] num_osc (uint): Number of oscillators in the network that defines size of the network.
      @param[in] type_conn (conn_type): Type of connections that are used in the network between oscillators.
      @param[in] conn_repr (conn_represent): Type of representation of connections.
      @param[in] height (uint): Number of oscillators in column of the network, this argument is used
                  only for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored.
      @param[in] width (uint): Number of oscillotors in row of the network, this argument is used only
                  for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored.
  
      """
  
      self._num_osc = num_osc
      self._conn_represent = conn_repr
      self.__conn_type = type_conn
  
      if conn_repr is None:
          self._conn_represent = conn_represent.MATRIX
  
      if (type_conn == conn_type.GRID_EIGHT) or (
          type_conn == conn_type.GRID_FOUR
      ):
          if (height is not None) and (width is not None):
              self.__height = height
              self.__width = width
          else:
              side_size = self._num_osc**0.5
              if side_size - math.floor(side_size) > 0:
                  raise NameError(
                      "Invalid number of oscillators '"
                      + str(num_osc)
                      + "' in the network in case of grid structure (root square should be extractable for the number of oscillators)."
                  )
  
              self.__height = int(side_size)
              self.__width = self.__height
  
          if self.__height * self.__width != self._num_osc:
              raise NameError(
                  "Width ("
                  + str(self.__width)
                  + ") x Height ("
                  + str(self.__height)
                  + ") must be equal to Size ("
                  + str(self._num_osc)
                  + ") in case of grid structure"
              )
  
      self._create_structure(type_conn)
  
imports: import math
  from enum import IntEnum
label_desc: Use image node_id 4 to create a new network object  with example: obj = network(num_osc, type_conn, conn_repr, height, width)