Ignore:
Timestamp:
05/09/13 18:57:22 (8 years ago)
Author:
sforsten
Message:

#1980: several small bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Manipulator/UniformSomePositionManipulator.cs

    r9204 r9475  
    5555    }
    5656
    57     protected override VariableVector Manipulate(IRandom random, VariableVectorInput input, VariableVector child) {
    58       return Manipulate(random, input, child, ProbabilityParameter.ActualValue.Value, PossibleActionsParameter.ActualValue);
     57    protected override VariableVector Manipulate(IRandom random, VariableVectorInput input, VariableVector child, double spreadPercentage) {
     58      return Manipulate(random, input, child, ProbabilityParameter.ActualValue.Value, PossibleActionsParameter.ActualValue, spreadPercentage);
    5959    }
    6060
    61     public static VariableVector Manipulate(IRandom random, VariableVectorInput input, VariableVector child, double probability, IItemSet<VariableVectorAction> possibleActions) {
    62       child = ManipulateCondition(random, input, child, probability);
     61    public static VariableVector Manipulate(IRandom random, VariableVectorInput input, VariableVector child, double probability, IItemSet<VariableVectorAction> possibleActions, double spreadPercentage) {
     62      child = ManipulateCondition(random, input, child, probability, spreadPercentage);
    6363      return ManipulateAction(random, child, probability, possibleActions);
    6464    }
    6565
    66     public static VariableVector ManipulateCondition(IRandom random, VariableVectorInput input, VariableVector child, double probability) {
     66    public static VariableVector ManipulateCondition(IRandom random, VariableVectorInput input, VariableVector child, double probability, double spreadPercentage) {
    6767      for (int index = 0; index < child.Condition.VirtualLength; index++) {
    6868        if (random.NextDouble() < probability) {
    69           child = UniformOnePositionInConditionManipulator.Manipulate(random, input, child, index);
     69          child = UniformOnePositionInConditionManipulator.Manipulate(random, input, child, index, spreadPercentage);
    7070        }
    7171      }
Note: See TracChangeset for help on using the changeset viewer.