Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/08 02:08:02 (17 years ago)
Author:
swagner
Message:

Worked on ticket #41

  • added generic ItemList<T>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection.OffspringSelection/OffspringSelector.cs

    r2 r40  
    3838      AddVariableInfo(new VariableInfo("SelectionPressure", "Current selection pressure", typeof(DoubleData), VariableKind.New | VariableKind.Out));
    3939      AddVariableInfo(new VariableInfo("SuccessRatio", "Current success ratio", typeof(DoubleData), VariableKind.New | VariableKind.Out));
    40       AddVariableInfo(new VariableInfo("GoodChildren", "Temporarily store successful children", typeof(ItemList), VariableKind.New | VariableKind.Out | VariableKind.In | VariableKind.Deleted));
    41       AddVariableInfo(new VariableInfo("BadChildren", "Temporarily store unsuccessful children", typeof(ItemList), VariableKind.New | VariableKind.Out | VariableKind.In | VariableKind.Deleted));
     40      AddVariableInfo(new VariableInfo("GoodChildren", "Temporarily store successful children", typeof(ItemList<IScope>), VariableKind.New | VariableKind.Out | VariableKind.In | VariableKind.Deleted));
     41      AddVariableInfo(new VariableInfo("BadChildren", "Temporarily store unsuccessful children", typeof(ItemList<IScope>), VariableKind.New | VariableKind.Out | VariableKind.In | VariableKind.Deleted));
    4242    }
    4343
     
    5050
    5151      // retrieve good and bad children
    52       ItemList goodChildren = GetVariableValue<ItemList>("GoodChildren", scope, false, false);
     52      ItemList<IScope> goodChildren = GetVariableValue<ItemList<IScope>>("GoodChildren", scope, false, false);
    5353      if (goodChildren == null) {
    54         goodChildren = new ItemList();
    55         goodChildren.ItemType = typeof(IScope);
     54        goodChildren = new ItemList<IScope>();
    5655        IVariableInfo goodChildrenInfo = GetVariableInfo("GoodChildren");
    5756        if (goodChildrenInfo.Local)
     
    6059          scope.AddVariable(new Variable(goodChildrenInfo.ActualName, goodChildren));
    6160      }
    62       ItemList badChildren = GetVariableValue<ItemList>("BadChildren", scope, false, false);
     61      ItemList<IScope> badChildren = GetVariableValue<ItemList<IScope>>("BadChildren", scope, false, false);
    6362      if (badChildren == null) {
    64         badChildren = new ItemList();
    65         badChildren.ItemType = typeof(IScope);
     63        badChildren = new ItemList<IScope>();
    6664        IVariableInfo badChildrenInfo = GetVariableInfo("BadChildren");
    6765        if (badChildrenInfo.Local)
Note: See TracChangeset for help on using the changeset viewer.