Class represents graph coloring algorithm based on hysteresis oscillatory network. More...
Public Member Functions | |
def | __init__ (self, graph_matrix, alpha, eps) |
Constructor of hysteresis oscillatory network for graph coloring. More... | |
def | process (self, steps, time, collect_dynamic=True) |
Peforms graph coloring analysis using simulation of the oscillatory network. More... | |
Public Member Functions inherited from pyclustering.nnet.hysteresis.hysteresis_network | |
def | outputs (self) |
Returns current outputs of neurons. More... | |
def | outputs (self, values) |
Sets outputs of neurons. | |
def | states (self) |
Return current states of neurons. More... | |
def | states (self, values) |
Set current states of neurons. | |
def | __init__ (self, num_osc, own_weight=-4, neigh_weight=-1, type_conn=conn_type.ALL_TO_ALL, type_conn_represent=conn_represent.MATRIX) |
Constructor of hysteresis oscillatory network. More... | |
def | simulate (self, steps, time, solution=solve_type.RK4, collect_dynamic=True) |
Performs static simulation of hysteresis oscillatory network. More... | |
def | simulate_static (self, steps, time, solution=solve_type.RK4, collect_dynamic=False) |
Performs static simulation of hysteresis oscillatory network. 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 | has_connection (self, i, j) |
Returns True if there is connection between i and j oscillators and False - if connection doesn't exist. More... | |
def | set_connection (self, i, j) |
Couples two specified oscillators in the network with dynamic connections. More... | |
def | get_neighbors (self, index) |
Finds neighbors of the oscillator with specified index. More... | |
Class represents graph coloring algorithm based on hysteresis oscillatory network.
This is bio-inspired algorithm where the network uses relaxation oscillators that is regarded as a multi-vibrator. Each ensemble of synchronous oscillators corresponds to only one color.
Example
Definition at line 94 of file hysteresis.py.
def pyclustering.gcolor.hysteresis.hysteresisgcolor.__init__ | ( | self, | |
graph_matrix, | |||
alpha, | |||
eps | |||
) |
Constructor of hysteresis oscillatory network for graph coloring.
[in] | graph_matrix | (list): Matrix representation of a graph. |
[in] | alpha | (double): Positive constant (affect weight between two oscillators w[i][j]). |
[in] | eps | (double): Positive constant (affect feedback to itself (i = j) of each oscillator w[i][j] = -alpha - eps). |
Definition at line 129 of file hysteresis.py.
def pyclustering.gcolor.hysteresis.hysteresisgcolor.process | ( | self, | |
steps, | |||
time, | |||
collect_dynamic = True |
|||
) |
Peforms graph coloring analysis using simulation of the oscillatory network.
[in] | steps | (uint): Number steps of simulations during simulation. |
[in] | time | (double): Time of simulation. |
[in] | collect_dynamic | (bool): Specified requirement to collect whole dynamic of the network. |
Definition at line 161 of file hysteresis.py.