Free cookie consent management tool by TermsFeed Policy Generator

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

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

Location:
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.