| @@ 314-315 (lines=2) @@ | ||
| 311 | if (self._ena_conn_weight is True): |
|
| 312 | conn_weight = self._conn_weight[index][k]; |
|
| 313 | ||
| 314 | phase += conn_weight * self._weight * math.sin(self._phases[k] - teta); |
|
| 315 | ||
| 316 | divider = len(neighbors); |
|
| 317 | if (divider == 0): |
|
| 318 | divider = 1.0; |
|
| @@ 309-310 (lines=2) @@ | ||
| 306 | phase = 0.0; # phase of a specified oscillator that will calculated in line with current env. states. |
|
| 307 | ||
| 308 | neighbors = self.get_neighbors(index); |
|
| 309 | for k in neighbors: |
|
| 310 | conn_weight = 1.0; |
|
| 311 | if (self._ena_conn_weight is True): |
|
| 312 | conn_weight = self._conn_weight[index][k]; |
|
| 313 | ||
| @@ 406-407 (lines=2) @@ | ||
| 403 | axes.scatter(self.__location[i][0], self.__location[i][1], self.__location[i][2], c = 'b', marker = 'o'); |
|
| 404 | ||
| 405 | for j in range(i, self._num_osc, 1): # draw connection between two points only one time |
|
| 406 | if (self.__weights[i][j] > 0.0): |
|
| 407 | axes.plot([self.__location[i][0], self.__location[j][0]], [self.__location[i][1], self.__location[j][1]], [self.__location[i][2], self.__location[j][2]], 'b-', linewidth = 0.5); |
|
| 408 | ||
| 409 | plt.grid(); |
|
| 410 | plt.show(); |
|