Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/13 15:15:13 (11 years ago)
Author:
sforsten
Message:

#1980:

  • added DecisionListView
  • added event handlers in *ProblemData
  • renamed project Problems.XCS.Views to Problems.lCS.Views and Problems.Instances.ConditionActionClassification to Problems.Instances.LCS
  • integrated niching in GAssist and added NichingTournamentSelector
  • minor code improvements and property changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblemData.cs

    r9226 r9352  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Collections;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    109110    #endregion
    110111
     112    [StorableHook(HookType.AfterDeserialization)]
     113    private void AfterDeserialization() {
     114      RegisterParameterEvents();
     115    }
    111116    [StorableConstructor]
    112117    protected ConditionActionClassificationProblemData(bool deserializing) : base(deserializing) { }
    113118    protected ConditionActionClassificationProblemData(ConditionActionClassificationProblemData original, Cloner cloner)
    114119      : base(original, cloner) {
     120      RegisterParameterEvents();
    115121    }
    116122
     
    144150
    145151      ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false;
     152
     153      RegisterParameterEvents();
    146154    }
    147155
     
    167175
    168176    protected IDictionary<int, IInput> fetchInputCache = new Dictionary<int, IInput>();
     177
     178    #region events
     179    private void RegisterParameterEvents() {
     180      ConditionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged);
     181      ConditionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged);
     182      ActionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged);
     183      ActionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged);
     184    }
     185    private void DeregisterParameterEvents() {
     186      ActionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged);
     187      ActionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged);
     188      ConditionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged);
     189      ConditionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged);
     190    }
     191    private void Value_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> e) {
     192      ActionConditionVariablesChanged();
     193    }
     194    private void VariablesChanged(object sender, EventArgs e) {
     195      ActionConditionVariablesChanged();
     196    }
     197
     198    protected abstract void ActionConditionVariablesChanged();
     199    #endregion
    169200  }
    170201}
Note: See TracChangeset for help on using the changeset viewer.