Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/29/16 22:23:58 (8 years ago)
Author:
thasling
Message:

#2615:
it works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs

    r13956 r13959  
    7272    private List<PeerInfo> ChoosePeersForMessaging(List<PeerInfo> allPeers) {
    7373      //communicate with 10% of the network
    74       int noOfPeers = allPeers.Count / (100 /communicationRate);
     74      int noOfPeers = allPeers.Count / (100 / communicationRate);
    7575      List<int> indexList = GetRandomItemIndexes(noOfPeers, 0, allPeers.Count - 1);
    7676      List<PeerInfo> res = new List<PeerInfo>();
     
    8686      int tmp = -1;
    8787      while (res.Count < noOfItems) {
    88         tmp = rnd.Next(minValue, maxValue);
     88        tmp = rnd.Next(minValue, maxValue + 1);
    8989        if (!res.Contains(tmp)) {
    9090          res.Add(tmp);
Note: See TracChangeset for help on using the changeset viewer.