helios.layouts.base¶
Network Layout Abstract Classes
This module provides a set of abstract classes to deal with different network layouts algorithms using different communication strategies.
List of Objects¶
is_running¶
NetworkLayoutAsync¶
-
class
helios.layouts.base.
NetworkLayoutAsync
[source]¶ Bases:
helios.layouts.base.NetworkLayout
NetworkLayoutIPCRender¶
-
class
helios.layouts.base.
NetworkLayoutIPCRender
(network_draw, edges, weights=None)[source]¶ Bases:
abc.ABC
An abstract class which reads the network information and creates the shared memory resources.
- Parameters
network_draw (NetworkDraw) – A NetworkDraw object which will be used to draw the network
edges (ndarray) – a bi-dimensional array with the edges list
weights (array, optional) – a one-dimensional array with the edge weights
-
start
(ms=30, steps=100, iters_by_step=2, record_positions=False, without_iren_start=True)[source]¶ This method starts the network layout algorithm creating a new subprocess.
Right after the network layout algorithm finish the computation (ending of the related subprocess), the stop method will be called automatically.
- Parameters
ms (float) – time interval in milleseconds to update the positions inside of the NetworkDraw
steps (int) – number of steps; snapshots. For example, if you set steps=3 that means the positions will be updated three times.
iters_by_step (int) – number of interations in each step
record_positions (bool, optional, default True) – Record the positions of the network
without_iren_start (bool, optional, default True) – Set this to False if you will start the ShowManager. That is, if you will invoke the following commands
Examples
>>> network_draw.initialize() >>> network_draw.start()
NetworkLayoutIPCServerCalc¶
-
class
helios.layouts.base.
NetworkLayoutIPCServerCalc
(num_nodes, num_edges, edges_buffer_name, positions_buffer_name, info_buffer_name, weights_buffer_name=None, dimension=3, snaphosts_buffer_name=None, num_snapshots=0)[source]¶ Bases:
abc.ABC
An abstract class which reads the network information from the shared memory resources.
This should be used inside of a subprocess which will update the network layout positions
- Parameters