Changeset 13959 for branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
- Timestamp:
- 06/29/16 22:23:58 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
r13956 r13959 72 72 private List<PeerInfo> ChoosePeersForMessaging(List<PeerInfo> allPeers) { 73 73 //communicate with 10% of the network 74 int noOfPeers = allPeers.Count / (100 / communicationRate);74 int noOfPeers = allPeers.Count / (100 / communicationRate); 75 75 List<int> indexList = GetRandomItemIndexes(noOfPeers, 0, allPeers.Count - 1); 76 76 List<PeerInfo> res = new List<PeerInfo>(); … … 86 86 int tmp = -1; 87 87 while (res.Count < noOfItems) { 88 tmp = rnd.Next(minValue, maxValue );88 tmp = rnd.Next(minValue, maxValue + 1); 89 89 if (!res.Contains(tmp)) { 90 90 res.Add(tmp);
Note: See TracChangeset
for help on using the changeset viewer.