Exemplo n.º 1
0
        private void CalculateCumulativeWeights()
        {
            if (!IsCumulativeWeightsStale) //If it's not stale, we can skip this!
            {
                return;
            }

            IsCumulativeWeightsStale = false;
            CumulativeWeights        = BinarySearchOptimizer.GetCumulativeWeights(Items);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 计算累计权重
        /// </summary>
        private void CalculateCumulativeWeights()
        {
            if (!_isAddedCumulativeWeights) //如果没有被添加,则跳过
            {
                return;
            }

            _isAddedCumulativeWeights = false;
            CumulativeWeights         = BinarySearchOptimizer.GetCumulativeWeights(Items);
        }