Exemplo n.º 1
0
        /// <summary>
        ///  Is the specified calculator valid for this dataset (has no unknown values and not all the same value)?
        /// </summary>
        private bool IsValidCalculator(int calculatorIndex)
        {
            double maxValue = Double.MinValue;
            double minValue = Double.MaxValue;

            foreach (var peakTransitionGroupFeatures in _peakTransitionGroupFeaturesList.Features)
            {
                // Find the highest and second highest scores among the transitions in this group.
                foreach (var peakGroupFeatures in peakTransitionGroupFeatures.PeakGroupFeatures)
                {
                    double value = peakGroupFeatures.Features[calculatorIndex];
                    if (EditPeakScoringModelDlg.IsUnknown(value))
                    {
                        return(false);
                    }
                    maxValue = Math.Max(value, maxValue);
                    minValue = Math.Min(value, minValue);
                }
            }
            return(maxValue > minValue);
        }