예제 #1
0
파일: Node.cs 프로젝트: mahdiz/mpclib
        private int[] HashBottomSupernodes(IDataItem <T> dataItem, int B)
        {
            var indexArray = new int[B];
            var randomHash = new Random(dataItem.GetHashCode());

            for (int i = 0; i < B; i++)
            {
                // TODO: What about duplicate bottom supernodes?
                var hashIndex = randomHash.Next(0, netWidth);
                indexArray[i] = (netHeight - 1) * netWidth + hashIndex;
            }
            return(indexArray);
        }