Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/26/14 13:24:20 (10 years ago)
Author:
mkommend
Message:

#2174: Implemented multi-encoding operators and adapated wiring of operators in the programmable problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/BinaryEncoding.cs

    r11582 r11587  
    4848    }
    4949    public override IEnumerable<IValueParameter> Parameters {
    50       get { return base.Parameters.Concat(new IValueParameter[] { LengthParameter }); }
     50      get { return new IValueParameter[] { LengthParameter }; }
    5151    }
    5252    #endregion
     
    7373      : base(name) {
    7474      lengthParameter = new FixedValueParameter<IntValue>(Name + "Length", new IntValue(length));
     75      SolutionCreator = new RandomBinaryVectorCreator();
    7576      RegisterParameterEvents();
    7677      DiscoverOperators();
    77       SolutionCreator = Operators.OfType<RandomBinaryVectorCreator>().Single();
    7878    }
    7979
     
    106106      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, pluginDescription, true, false, false);
    107107      var operators = discoveredTypes.Select(t => (IOperator)Activator.CreateInstance(t));
    108       var newOperators = operators.Except(encodingOperators, new TypeEqualityComparer<IOperator>()).ToList();
     108      var newOperators = operators.Except(Operators, new TypeEqualityComparer<IOperator>()).ToList();
    109109
    110110      ConfigureOperators(newOperators);
    111       encodingOperators.AddRange(newOperators);
     111      foreach (var @operator in newOperators)
     112        encodingOperators.Add(@operator);
    112113    }
    113114    #endregion
Note: See TracChangeset for help on using the changeset viewer.