pyclustering
0.10.1
pyclustring is a Python, C++ data mining library.
|
Oscillatory network based on Kuramoto model with negative and positive connections for graph coloring problem. More...
Public Member Functions | |
def | __init__ (self, graph_matrix, positive_weight, negative_weight, reduction=None) |
Constructor of the oscillatory network syncgcolor for graph coloring problem. More... | |
def | process (self, order=0.998, solution=solve_type.FAST, collect_dynamic=False) |
Performs simulation of the network (performs solving of graph coloring problem). More... | |
Public Member Functions inherited from pyclustering.nnet.sync.sync_network | |
def | __init__ (self, num_osc, weight=1, frequency=0, type_conn=conn_type.ALL_TO_ALL, representation=conn_represent.MATRIX, initial_phases=initial_type.RANDOM_GAUSSIAN, ccore=True) |
Constructor of oscillatory network is based on Kuramoto model. More... | |
def | __del__ (self) |
Destructor of oscillatory network is based on Kuramoto model. | |
def | sync_order (self) |
Calculates current level of global synchorization (order parameter) in the network. More... | |
def | sync_local_order (self) |
Calculates current level of local (partial) synchronization in the network. More... | |
def | simulate (self, steps, time, solution=solve_type.FAST, collect_dynamic=True) |
Performs static simulation of Sync oscillatory network. More... | |
def | simulate_dynamic (self, order=0.998, solution=solve_type.FAST, collect_dynamic=False, step=0.1, int_step=0.01, threshold_changes=0.0000001) |
Performs dynamic simulation of the network until stop condition is not reached. More... | |
def | simulate_static (self, steps, time, solution=solve_type.FAST, collect_dynamic=False) |
Performs static simulation of oscillatory network. More... | |
def | get_neighbors (self, index) |
Finds neighbors of the oscillator with specified index. More... | |
def | has_connection (self, i, j) |
Returns True if there is connection between i and j oscillators and False - if connection doesn't exist. More... | |
Public Member Functions inherited from pyclustering.nnet.network | |
def | height (self) |
Height of the network grid (that is defined by amout of oscillators in each column), this value is zero in case of non-grid structure. More... | |
def | width (self) |
Width of the network grid, this value is zero in case of non-grid structure. More... | |
def | structure (self) |
Type of network structure that is used for connecting oscillators. | |
def | __init__ (self, num_osc, type_conn=conn_type.ALL_TO_ALL, conn_repr=conn_represent.MATRIX, height=None, width=None) |
Constructor of the network. More... | |
def | __len__ (self) |
Returns size of the network that is defined by amount of oscillators. | |
def | set_connection (self, i, j) |
Couples two specified oscillators in the network with dynamic connections. More... | |
Oscillatory network based on Kuramoto model with negative and positive connections for graph coloring problem.
def pyclustering.gcolor.sync.syncgcolor.__init__ | ( | self, | |
graph_matrix, | |||
positive_weight, | |||
negative_weight, | |||
reduction = None |
|||
) |
Constructor of the oscillatory network syncgcolor for graph coloring problem.
[in] | graph_matrix | (list): Graph represented by matrix. |
[in] | positive_weight | (double): Value of weight of positive connections. |
[in] | negative_weight | (double): Value of weight of negative connections. |
[in] | reduction | (bool): Inverse degree of the processed graph. |
def pyclustering.gcolor.sync.syncgcolor.process | ( | self, | |
order = 0.998 , |
|||
solution = solve_type.FAST , |
|||
collect_dynamic = False |
|||
) |
Performs simulation of the network (performs solving of graph coloring problem).
[in] | order | (double): Defines when process of synchronization in the network is over, range from 0 to 1. |
[in] | solution | (solve_type): defines type (method) of solving diff. equation. |
[in] | collect_dynamic | (bool): If True - return full dynamic of the network, otherwise - last state of phases. |