Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/10 14:18:22 (15 years ago)
Author:
swagner
Message:

Added Reset event to IProblem (#1006)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r3663 r3739  
    191191        BestKnownSolution = new Permutation(PermutationTypes.RelativeUndirected, tourParser.Tour);
    192192      }
     193      OnReset();
    193194    }
    194195    public void ImportFromTSPLIB(string tspFileName, string optimalTourFileName, double bestKnownQuality) {
     
    200201    public event EventHandler SolutionCreatorChanged;
    201202    private void OnSolutionCreatorChanged() {
    202       if (SolutionCreatorChanged != null)
    203         SolutionCreatorChanged(this, EventArgs.Empty);
     203      EventHandler handler = SolutionCreatorChanged;
     204      if (handler != null) handler(this, EventArgs.Empty);
    204205    }
    205206    public event EventHandler EvaluatorChanged;
    206207    private void OnEvaluatorChanged() {
    207       if (EvaluatorChanged != null)
    208         EvaluatorChanged(this, EventArgs.Empty);
     208      EventHandler handler = EvaluatorChanged;
     209      if (handler != null) handler(this, EventArgs.Empty);
    209210    }
    210211    public event EventHandler OperatorsChanged;
    211212    private void OnOperatorsChanged() {
    212       if (OperatorsChanged != null)
    213         OperatorsChanged(this, EventArgs.Empty);
     213      EventHandler handler = OperatorsChanged;
     214      if (handler != null) handler(this, EventArgs.Empty);
     215    }
     216    public event EventHandler Reset;
     217    private void OnReset() {
     218      EventHandler handler = Reset;
     219      if (handler != null) handler(this, EventArgs.Empty);
    214220    }
    215221
Note: See TracChangeset for help on using the changeset viewer.