Changeset 3520


Ignore:
Timestamp:
04/24/10 15:22:22 (12 years ago)
Author:
abeham
Message:

forbid changing some operator names #889, #890, #913, #914, #934, #924

Location:
trunk/sources
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class BinaryVectorCreator : SingleSuccessorOperator, IBinaryVectorCreator, IStochasticOperator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
    3740    public ILookupParameter<IRandom> RandomParameter {
    3841      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class BinaryVectorCrossover : SingleSuccessorOperator, IBinaryVectorCrossover, IStochasticOperator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
    3740    public ILookupParameter<IRandom> RandomParameter {
    3841      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class BinaryVectorManipulator : SingleSuccessorOperator, IBinaryVectorManipulator, IStochasticOperator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
    3740    public ILookupParameter<IRandom> RandomParameter {
    3841      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveGenerator.cs

    r3376 r3520  
    3232  [StorableClass]
    3333  public abstract class OneBitflipMoveGenerator : SingleSuccessorOperator, IOneBitflipMoveOperator, IMoveGenerator {
     34    public override bool CanChangeName {
     35      get { return false; }
     36    }
    3437    public ILookupParameter<BinaryVector> BinaryVectorParameter {
    3538      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
     
    6265
    6366    protected abstract OneBitflipMove[] GenerateMoves(BinaryVector binaryVector);
    64 
    65     public override bool CanChangeName {
    66       get { return false; }
    67     }
    6867  }
    6968}
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveMaker.cs

    r3376 r3520  
    3333  [StorableClass]
    3434  public class OneBitflipMoveMaker : SingleSuccessorOperator, IOneBitflipMoveOperator, IMoveMaker {
     35    public override bool CanChangeName {
     36      get { return false; }
     37    }
    3538    public ILookupParameter<DoubleValue> QualityParameter {
    3639      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     
    6669      return base.Apply();
    6770    }
    68 
    69     public override bool CanChangeName {
    70       get { return false; }
    71     }
    7271  }
    7372}
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuChecker.cs

    r3376 r3520  
    3333  [StorableClass]
    3434  public class OneBitflipMoveTabuChecker : SingleSuccessorOperator, IOneBitflipMoveOperator, ITabuChecker {
     35    public override bool CanChangeName {
     36      get { return false; }
     37    }
    3538    public ILookupParameter<OneBitflipMove> OneBitflipMoveParameter {
    3639      get { return (LookupParameter<OneBitflipMove>)Parameters["OneBitflipMove"]; }
     
    9497      return base.Apply();
    9598    }
    96 
    97     public override bool CanChangeName {
    98       get { return false; }
    99     }
    10099  }
    101100}
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuMaker.cs

    r3418 r3520  
    5252      return new OneBitflipMoveAttribute(OneBitflipMoveParameter.ActualValue.Index, baseQuality);
    5353    }
    54 
    55     public override bool CanChangeName {
    56       get { return false; }
    57     }
    5854  }
    5955}
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipMultiMoveGenerator.cs

    r3376 r3520  
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Operators;
    2627using HeuristicLab.Optimization;
    2728using HeuristicLab.Parameters;
     
    3132  [Item("StochasticOneBitflipMultiMoveGenerator", "Randomly samples n from all possible one bitflip moves from a given BinaryVector.")]
    3233  [StorableClass]
    33   public class StochasticOneBitflipMultiMoveGenerator : StochasticOneBitflipSingleMoveGenerator, IMultiMoveGenerator {
     34  public class StochasticOneBitflipMultiMoveGenerator : OneBitflipMoveGenerator, IMultiMoveGenerator {
     35    public ILookupParameter<IRandom> RandomParameter {
     36      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     37    }
    3438    public IValueLookupParameter<IntValue> SampleSizeParameter {
    3539      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
     
    4347    public StochasticOneBitflipMultiMoveGenerator()
    4448      : base() {
     49      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    4550      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
    4651    }
     
    4954      OneBitflipMove[] moves = new OneBitflipMove[sampleSize];
    5055      for (int i = 0; i < sampleSize; i++) {
    51         moves[i] = Apply(binaryVector, random);
     56        moves[i] = StochasticOneBitflipSingleMoveGenerator.Apply(binaryVector, random);
    5257      }
    5358      return moves;
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCreator.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class IntegerVectorCreator : SingleSuccessorOperator, IIntegerVectorCreator, IStochasticOperator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
    3740    public ILookupParameter<IRandom> RandomParameter {
    3841      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCrossover.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class IntegerVectorCrossover : SingleSuccessorOperator, IIntegerVectorCrossover, IStochasticOperator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
    3740    public ILookupParameter<IRandom> RandomParameter {
    3841      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorManipulator.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class IntegerVectorManipulator : SingleSuccessorOperator, IIntegerVectorManipulator, IStochasticOperator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
    3740    public ILookupParameter<IRandom> RandomParameter {
    3841      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveTabuMaker.cs

    r3418 r3520  
    3434  [StorableClass]
    3535  public class TranslocationMoveTabuMaker : TabuMaker, IPermutationTranslocationMoveOperator {
    36     public override bool CanChangeName {
    37       get { return false; }
    38     }
    3936    public ILookupParameter<Permutation> PermutationParameter {
    4037      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveTabuMaker.cs

    r3418 r3520  
    3434  [StorableClass]
    3535  public class InversionMoveTabuMaker : TabuMaker, IPermutationInversionMoveOperator {
    36     public override bool CanChangeName {
    37       get { return false; }
    38     }
    3936    public ILookupParameter<Permutation> PermutationParameter {
    4037      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveGenerator.cs

    r3376 r3520  
    3333  [StorableClass]
    3434  public abstract class AdditiveMoveGenerator : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, IMoveGenerator, IStochasticOperator {
     35    public override bool CanChangeName {
     36      get { return false; }
     37    }
    3538    public ILookupParameter<IRandom> RandomParameter {
    3639      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    8184
    8285    protected abstract AdditiveMove[] GenerateMoves(IRandom random, RealVector realVector);
    83 
    84     public override bool CanChangeName {
    85       get { return false; }
    86     }
    8786  }
    8887}
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveMaker.cs

    r3376 r3520  
    3333  [StorableClass]
    3434  public class AdditiveMoveMaker : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, IMoveMaker {
     35    public override bool CanChangeName {
     36      get { return false; }
     37    }
    3538    public ILookupParameter<DoubleValue> QualityParameter {
    3639      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     
    6568      return base.Apply();
    6669    }
    67 
    68     public override bool CanChangeName {
    69       get { return false; }
    70     }
    7170  }
    7271}
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuChecker.cs

    r3376 r3520  
    3333  [StorableClass]
    3434  public class AdditiveMoveTabuChecker : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, ITabuChecker {
     35    public override bool CanChangeName {
     36      get { return false; }
     37    }
    3538    public ILookupParameter<AdditiveMove> AdditiveMoveParameter {
    3639      get { return (LookupParameter<AdditiveMove>)Parameters["AdditiveMove"]; }
     
    99102      return base.Apply();
    100103    }
    101 
    102     public override bool CanChangeName {
    103       get { return false; }
    104     }
    105104  }
    106105}
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuMaker.cs

    r3418 r3520  
    5454      return new AdditiveMoveTabuAttribute(move.Dimension, vector[move.Dimension], vector[move.Dimension] + move.MoveDistance, baseQuality);
    5555    }
    56    
    57     public override bool CanChangeName {
    58       get { return false; }
    59     }
    6056  }
    6157}
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorManipulator.cs

    r3450 r3520  
    3737  [StorableClass]
    3838  public class StdDevStrategyVectorManipulator : SingleSuccessorOperator, IStochasticOperator, IRealVectorStdDevStrategyParameterManipulator {
     39    public override bool CanChangeName {
     40      get { return false; }
     41    }
    3942    public ILookupParameter<IRandom> RandomParameter {
    4043      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/TabuMaker.cs

    r3418 r3520  
    3131  [StorableClass]
    3232  public abstract class TabuMaker : SingleSuccessorOperator, ITabuMaker {
     33    public override bool CanChangeName {
     34      get { return false; }
     35    }
    3336    public LookupParameter<ItemList<IItem>> TabuListParameter {
    3437      get { return (LookupParameter<ItemList<IItem>>)Parameters["TabuList"]; }
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs

    r3376 r3520  
    3535  [StorableClass]
    3636  public abstract class SingleObjectiveTestFunctionProblemEvaluator : SingleSuccessorOperator, ISingleObjectiveTestFunctionProblemEvaluator {
     37    /// <summary>
     38    /// These operators should not change their name through the GUI
     39    /// </summary>
     40    public override bool CanChangeName {
     41      get { return false; }
     42    }
    3743    /// <summary>
    3844    /// Returns whether the actual function constitutes a maximization or minimization problem.
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AdditiveMoveEvaluator.cs

    r3376 r3520  
    3434  [StorableClass]
    3535  public abstract class AdditiveMoveEvaluator : SingleSuccessorOperator, ISingleObjectiveTestFunctionAdditiveMoveEvaluator {
     36
    3637    public abstract Type EvaluatorType { get; }
     38    public override bool CanChangeName {
     39      get { return false; }
     40    }
     41
    3742    public ILookupParameter<DoubleValue> QualityParameter {
    3843      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPMoveEvaluator.cs

    r3376 r3520  
    3636  [StorableClass]
    3737  public abstract class TSPMoveEvaluator : SingleSuccessorOperator, ITSPMoveEvaluator, IMoveOperator {
     38
    3839    public abstract Type EvaluatorType { get; }
     40    public override bool CanChangeName {
     41      get { return false; }
     42    }
    3943
    4044    public ILookupParameter<DoubleValue> QualityParameter {
Note: See TracChangeset for help on using the changeset viewer.