Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12039


Ignore:
Timestamp:
02/19/15 12:52:41 (10 years ago)
Author:
pfleck
Message:

#2269
Per-layer parameter can be used to define all multiple layers.
If less values are specified in the array the last value is used for all subsequent layers.
I.e. when the array has the length 1, all layers use that same one value.
From a usability point of view, this behavior may has to be discussed more in detail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/LayerUniformSubScopesProcessor.cs

    r12035 r12039  
    2020#endregion
    2121
     22using System;
    2223using System.Collections;
    2324using System.Collections.Generic;
     
    6162        for (int i = 0; i < scopes.Count; i++) {
    6263          var layerParameters = new LayerIntermediateParameter {
    63             new ValueParameter<IntValue>(PopulationSizeParameter.ActualName, new IntValue(PopulationSizeParameter.ActualValue[i]))
     64            new ValueParameter<IntValue>(PopulationSizeParameter.ActualName, new IntValue(PopulationSizeParameter.ActualValue[Math.Min(i, PopulationSizeParameter.ActualValue.Length - 1)]))
    6465          };
    6566          var immediateContext = new ExecutionContext(ExecutionContext.Parent, layerParameters, scopes[i]);
Note: See TracChangeset for help on using the changeset viewer.