Common network description that consists of information about oscillators and connection between them. More...
Public Member Functions | |
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... | |
Common network description that consists of information about oscillators and connection between them.
Definition at line 97 of file __init__.py.
def pyclustering.nnet.network.__init__ | ( | self, | |
num_osc, | |||
type_conn = conn_type.ALL_TO_ALL , |
|||
conn_repr = conn_represent.MATRIX , |
|||
height = None , |
|||
width = None |
|||
) |
Constructor of the network.
[in] | num_osc | (uint): Number of oscillators in the network that defines size of the network. |
[in] | type_conn | (conn_type): Type of connections that are used in the network between oscillators. |
[in] | conn_repr | (conn_represent): Type of representation of connections. |
[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. |
[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. |
Definition at line 144 of file __init__.py.
def pyclustering.nnet.network.get_neighbors | ( | self, | |
index | |||
) |
Finds neighbors of the oscillator with specified index.
[in] | index | (uint): index of oscillator for which neighbors should be found in the network. |
Definition at line 409 of file __init__.py.
Referenced by pyclustering.nnet.legion.legion_network.__len__(), pyclustering.cluster.syncnet.syncnet.process(), pyclustering.cluster.syncnet.syncnet.show_network(), pyclustering.nnet.legion.legion_network.simulate(), and pyclustering.nnet.pcnn.pcnn_network.simulate().
def pyclustering.nnet.network.has_connection | ( | self, | |
i, | |||
j | |||
) |
Returns True if there is connection between i and j oscillators and False - if connection doesn't exist.
[in] | i | (uint): index of an oscillator in the network. |
[in] | j | (uint): index of an oscillator in the network. |
Definition at line 366 of file __init__.py.
Referenced by pyclustering.gcolor.sync.syncgcolor.__init__(), pyclustering.nnet.hysteresis.hysteresis_network.__init__(), pyclustering.cluster.syncnet.syncnet.show_network(), pyclustering.nnet.fsync.fsync_network.simulate(), and pyclustering.nnet.sync.sync_network.sync_local_order().
def pyclustering.nnet.network.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.
Definition at line 114 of file __init__.py.
def pyclustering.nnet.network.set_connection | ( | self, | |
i, | |||
j | |||
) |
Couples two specified oscillators in the network with dynamic connections.
[in] | i | (uint): index of an oscillator that should be coupled with oscillator 'j' in the network. |
[in] | j | (uint): index of an oscillator that should be coupled with oscillator 'i' in the network. |
Definition at line 387 of file __init__.py.
Referenced by pyclustering.cluster.syncnet.syncnet.__del__(), and pyclustering.gcolor.sync.syncgcolor.__init__().
def pyclustering.nnet.network.width | ( | self | ) |
Width of the network grid, this value is zero in case of non-grid structure.
Definition at line 125 of file __init__.py.