Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/18/11 17:47:49 (13 years ago)
Author:
cneumuel
Message:

#1215

  • minor fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurationTree.cs

    r5313 r5328  
    214214    }
    215215
    216     public long GetCombinationCount() {
     216    /// <summary>
     217    /// returns the number of possible parameter combinations
     218    /// </summary>
     219    /// <param name="max">algorithm stops counting when max is reached. zero for infinite counting</param>
     220    /// <returns></returns>
     221    public long GetCombinationCount(long max) {
    217222      long cnt = 0;
    218223      foreach (var c in this) {
    219224        cnt++;
     225        if (max > 0 && cnt >= max) {
     226          return cnt;
     227        }
    220228      }
    221229      return cnt;
Note: See TracChangeset for help on using the changeset viewer.