Changeset 13412 for branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Moves/TwoPointFiveOpt/TwoPointFiveMoveMaker.cs
- Timestamp:
- 11/28/15 23:38:51 (8 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Moves/TwoPointFiveOpt/TwoPointFiveMoveMaker.cs
r13408 r13412 1 using HeuristicLab.Common; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using HeuristicLab.Common; 2 23 using HeuristicLab.Core; 3 24 using HeuristicLab.Data; … … 11 32 [Item("TwoPointFiveMoveMaker", "Peforms an inversion and shift (2.5-opt) on a given permutation and updates the quality.")] 12 33 [StorableClass] 13 public class TwoPointFiveMoveMaker : SingleSuccessorOperator, I 25MoveOperator, IMoveMaker {34 public class TwoPointFiveMoveMaker : SingleSuccessorOperator, ITwoPointFiveMoveOperator, IMoveMaker { 14 35 public override bool CanChangeName { 15 36 get { return false; } 16 37 } 38 17 39 public ILookupParameter<DoubleValue> QualityParameter { 18 40 get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; } … … 27 49 get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; } 28 50 } 51 29 52 [StorableConstructor] 30 53 protected TwoPointFiveMoveMaker(bool deserializing) : base(deserializing) { } … … 43 66 44 67 public override IOperation Apply() { 45 TwoPointFiveMovemove = TwoPointFiveMoveParameter.ActualValue;46 Permutationpermutation = PermutationParameter.ActualValue;47 DoubleValuemoveQuality = MoveQualityParameter.ActualValue;48 DoubleValuequality = QualityParameter.ActualValue;68 var move = TwoPointFiveMoveParameter.ActualValue; 69 var permutation = PermutationParameter.ActualValue; 70 var moveQuality = MoveQualityParameter.ActualValue; 71 var quality = QualityParameter.ActualValue; 49 72 50 73 if (move.IsInvert) { … … 53 76 TranslocationManipulator.Apply(permutation, move.Index1, move.Index1, move.Index2); 54 77 } 55 78 56 79 quality.Value = moveQuality.Value; 57 80
Note: See TracChangeset
for help on using the changeset viewer.