@@ -33,7 +33,7 @@ def large_one_to_one():
33
33
wmap_list .append ({'from' : str (e ), 'to' : str (e ), 'weight' : 0 })
34
34
wmap_list .append ({'from' : str (e ), 'to' : str ((e + 1 ) % len (elements )), 'weight' : 1 })
35
35
wmap_list .append ({'from' : str (e ), 'to' : str ((e - 1 ) % len (elements )), 'weight' : 1 })
36
- wmap = allocating .WeightedMap (wmap_list )
36
+ wmap = allocating .ListWeightedMap (wmap_list )
37
37
38
38
yield allocating .Allocator (sources , wmap , targets )
39
39
@@ -48,7 +48,7 @@ def large_one_to_one_alternate():
48
48
wmap_list .append ({'from' : str (e ), 'to' : str (e ), 'weight' : 1 })
49
49
wmap_list .append ({'from' : str (e ), 'to' : str ((e + 1 ) % len (elements )), 'weight' : 3 * (e % 2 )})
50
50
wmap_list .append ({'from' : str (e ), 'to' : str ((e - 1 ) % len (elements )), 'weight' : 2.5 })
51
- wmap = allocating .WeightedMap (wmap_list )
51
+ wmap = allocating .ListWeightedMap (wmap_list )
52
52
53
53
yield allocating .Allocator (sources , wmap , targets )
54
54
@@ -77,7 +77,7 @@ def large_random(sources_number, targets_number, choices, limit_denominator):
77
77
for t in stargets :
78
78
wmap_list .append ({'from' : source , 'to' : t ,
79
79
'weight' : random .uniform (0 , 1 )})
80
- wmap = allocating .WeightedMap (wmap_list )
80
+ wmap = allocating .DictWeightedMap (wmap_list )
81
81
82
82
return allocating .Allocator (sources , wmap , targets , limit_denominator )
83
83
0 commit comments