Represents output dynamic of Sync. More...
Public Member Functions | |
def | output (self) |
(list) Returns output dynamic of the Sync network (phase coordinates of each oscillator in the network) during simulation. | |
def | time (self) |
(list) Returns sampling times when dynamic is measured during simulation. | |
def | __init__ (self, phase, time, ccore=None) |
Constructor of Sync dynamic. More... | |
def | __del__ (self) |
Default destructor of Sync dynamic. | |
def | __len__ (self) |
Returns number of simulation steps that are stored in dynamic. More... | |
def | __getitem__ (self, index) |
Indexing of the dynamic. | |
def | allocate_sync_ensembles (self, tolerance=0.01, indexes=None, iteration=None) |
Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster. More... | |
def | allocate_phase_matrix (self, grid_width=None, grid_height=None, iteration=None) |
Returns 2D matrix of phase values of oscillators at the specified iteration of simulation. More... | |
def | allocate_correlation_matrix (self, iteration=None) |
Allocate correlation matrix between oscillators at the specified step of simulation. More... | |
def | calculate_order_parameter (self, start_iteration=None, stop_iteration=None) |
Calculates level of global synchorization (order parameter). More... | |
def | calculate_local_order_parameter (self, oscillatory_network, start_iteration=None, stop_iteration=None) |
Calculates local order parameter. More... | |
def pyclustering.nnet.sync.sync_dynamic.__init__ | ( | self, | |
phase, | |||
time, | |||
ccore = None |
|||
) |
Constructor of Sync dynamic.
[in] | phase | (list): Dynamic of oscillators on each step of simulation. If ccore pointer is specified than it can be ignored. |
[in] | time | (list): Simulation time. |
[in] | ccore | (ctypes.pointer): Pointer to CCORE sync_dynamic instance in memory. |
def pyclustering.nnet.sync.sync_dynamic.__len__ | ( | self | ) |
def pyclustering.nnet.sync.sync_dynamic.allocate_correlation_matrix | ( | self, | |
iteration = None |
|||
) |
Allocate correlation matrix between oscillators at the specified step of simulation.
[in] | iteration | (uint): Number of iteration of simulation for which correlation matrix should be allocated. If iternation number is not specified, the last step of simulation is used for the matrix allocation. |
def pyclustering.nnet.sync.sync_dynamic.allocate_phase_matrix | ( | self, | |
grid_width = None , |
|||
grid_height = None , |
|||
iteration = None |
|||
) |
Returns 2D matrix of phase values of oscillators at the specified iteration of simulation.
User should ensure correct matrix sizes in line with following expression grid_width x grid_height that should be equal to amount of oscillators otherwise exception is thrown. If grid_width or grid_height are not specified than phase matrix size will by calculated automatically by square root.
[in] | grid_width | (uint): Width of the allocated matrix. |
[in] | grid_height | (uint): Height of the allocated matrix. |
[in] | iteration | (uint): Number of iteration of simulation for which correlation matrix should be allocated. If iternation number is not specified, the last step of simulation is used for the matrix allocation. |
def pyclustering.nnet.sync.sync_dynamic.allocate_sync_ensembles | ( | self, | |
tolerance = 0.01 , |
|||
indexes = None , |
|||
iteration = None |
|||
) |
Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
[in] | tolerance | (double): Maximum error for allocation of synchronous ensemble oscillators. |
[in] | indexes | (list): List of real object indexes and it should be equal to amount of oscillators (in case of 'None' - indexes are in range [0; amount_oscillators]). |
[in] | iteration | (uint): Iteration of simulation that should be used for allocation. |
Definition at line 194 of file sync.py.
Referenced by pyclustering.cluster.syncnet.syncnet_analyser.allocate_clusters(), and pyclustering.gcolor.sync.syncgcolor_analyser.allocate_color_clusters().
def pyclustering.nnet.sync.sync_dynamic.calculate_local_order_parameter | ( | self, | |
oscillatory_network, | |||
start_iteration = None , |
|||
stop_iteration = None |
|||
) |
Calculates local order parameter.
Local order parameter or so-called level of local or partial synchronization is calculated by following expression:
where N - total amount of oscillators in the network and - amount of neighbors of oscillator with index .
[in] | oscillatory_network | (sync): Sync oscillatory network whose structure of connections is required for calculation. |
[in] | start_iteration | (uint): The first iteration that is used for calculation, if 'None' then the last iteration is used. |
[in] | stop_iteration | (uint): The last iteration that is used for calculation, if 'None' then 'start_iteration' + 1 is used. |
def pyclustering.nnet.sync.sync_dynamic.calculate_order_parameter | ( | self, | |
start_iteration = None , |
|||
stop_iteration = None |
|||
) |
Calculates level of global synchorization (order parameter).
This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when desynchronization is observed in the network. Order parameter is calculated using following equation:
where is a average phase coordinate in the network, is an amount of oscillators in the network.
[in] | start_iteration | (uint): The first iteration that is used for calculation, if 'None' then the last iteration is used. |
[in] | stop_iteration | (uint): The last iteration that is used for calculation, if 'None' then 'start_iteration' + 1 is used. |
Example: