6
6
from numpy .random import rand
7
7
8
8
from pydistsim .logging import logger
9
- from pydistsim .network .network import BidirectionalNetwork , Network
9
+ from pydistsim .network .network import BidirectionalNetwork , DirectedNetwork
10
10
from pydistsim .network .node import Node
11
11
from pydistsim .network .rangenetwork import BidirectionalRangeNetwork , RangeNetwork
12
12
@@ -303,7 +303,7 @@ def generate_complete_network(cls, n: int, network_type: type[T] = None, directe
303
303
>>> net1 = NetworkGenerator.generate_complete_network(5)
304
304
<BidirectionalNetwork object with 5 nodes and 10 edges>
305
305
>>> net2 = NetworkGenerator.generate_complete_network(5, directed_network=True)
306
- <Network object with 5 nodes and 20 edges>
306
+ <DirectedNetwork object with 5 nodes and 20 edges>
307
307
>>> net3 = NetworkGenerator.generate_complete_network(5, network_type=BidirectionalNetwork)
308
308
<BidirectionalNetwork object with 5 nodes and 10 edges>
309
309
@@ -322,7 +322,7 @@ def generate_complete_network(cls, n: int, network_type: type[T] = None, directe
322
322
directed_network = False
323
323
324
324
if network_type is None :
325
- network_type = Network if directed_network else BidirectionalNetwork
325
+ network_type = DirectedNetwork if directed_network else BidirectionalNetwork
326
326
327
327
net = network_type ()
328
328
node_pos_list = cls .__get_ring_pos (n , net .environment )
@@ -349,7 +349,7 @@ def generate_ring_network(cls, n: int, network_type: type[T] = None, directed_ne
349
349
>>> net = NetworkGenerator.generate_ring_network(6)
350
350
<BidirectionalNetwork object with 6 nodes and 6 edges>
351
351
>>> net = NetworkGenerator.generate_ring_network(6, directed_network=False)
352
- <Network object with 6 nodes and 6 edges>
352
+ <DirectedNetwork object with 6 nodes and 6 edges>
353
353
354
354
DO NOT instantiate the class, this is a class method.
355
355
@@ -366,7 +366,7 @@ def generate_ring_network(cls, n: int, network_type: type[T] = None, directed_ne
366
366
directed_network = False
367
367
368
368
if network_type is None :
369
- network_type = Network if directed_network else BidirectionalNetwork
369
+ network_type = DirectedNetwork if directed_network else BidirectionalNetwork
370
370
371
371
net = network_type ()
372
372
node_pos_list = cls .__get_ring_pos (n , net .environment )
@@ -409,7 +409,7 @@ def generate_star_network(cls, n: int, network_type: type[T] = None, directed_ne
409
409
directed_network = False
410
410
411
411
if network_type is None :
412
- network_type = Network if directed_network else BidirectionalNetwork
412
+ network_type = DirectedNetwork if directed_network else BidirectionalNetwork
413
413
414
414
net = network_type ()
415
415
node_pos_list = cls .__get_ring_pos (n - 1 , net .environment )
@@ -447,7 +447,7 @@ def generate_hypercube_network(
447
447
>>> net = NetworkGenerator.generate_hypercube_network(dimension=3)
448
448
<BidirectionalNetwork object with 8 nodes and 12 edges>
449
449
>>> net2 = NetworkGenerator.generate_hypercube_network(dimension=3, directed_network=True)
450
- <Network object with 8 nodes and 24 edges>
450
+ <DirectedNetwork object with 8 nodes and 24 edges>
451
451
>>> net3 = NetworkGenerator.generate_complete_network(n=8)
452
452
<BidirectionalNetwork object with 8 nodes and 12 edges>
453
453
@@ -477,7 +477,7 @@ def generate_hypercube_network(
477
477
directed_network = False
478
478
479
479
if network_type is None :
480
- network_type = Network if directed_network else BidirectionalNetwork
480
+ network_type = DirectedNetwork if directed_network else BidirectionalNetwork
481
481
482
482
LABEL_KEY = "HYPERCUBE_LABEL"
483
483
@@ -616,7 +616,7 @@ def generate_mesh_network(
616
616
directed_network = False
617
617
618
618
if network_type is None :
619
- network_type = Network if directed_network else BidirectionalNetwork
619
+ network_type = DirectedNetwork if directed_network else BidirectionalNetwork
620
620
621
621
if a is None or b is None :
622
622
if n is None :
0 commit comments