Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 11:37:45 (14 years ago)
Author:
mkommend
Message:

#1418: Removed calls to IEnumerable.Count() in performance critical sections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs

    r5882 r5907  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.Linq;
    2324using HeuristicLab.Analysis;
     
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using System.Collections.Generic;
    3131
    3232namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    7676    public override IOperation Apply() {
    7777      IEnumerable<int> rows = GenerateRowsToEvaluate();
    78       if (rows.Count() <= 0) return base.Apply();
     78      if (!rows.Any()) return base.Apply();
    7979
    8080      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
Note: See TracChangeset for help on using the changeset viewer.