Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/10 10:30:24 (15 years ago)
Author:
gkronber
Message:

Changed multi-operators in symbolic expression tree encoding to populate the list of available operators via the ApplicationManager. #937 (Data types and operators for symbolic expression tree encoding)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs

    r3534 r3569  
    3030using HeuristicLab.Data;
    3131using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
     32using HeuristicLab.PluginInfrastructure;
    3233
    3334namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
     
    7576      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionGrammarParameterName, "The grammar that defines the allowed symbols and syntax of the symbolic expression trees."));
    7677
    77       Operators.Add(new FullTreeShaker());
    78       Operators.Add(new OnePointShaker());
    79       Operators.Add(new ChangeNodeTypeManipulation());
     78      foreach (var availableOperatorType in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeArchitectureManipulator))) {
     79        if (availableOperatorType != this.GetType())
     80          Operators.Add((ISymbolicExpressionTreeArchitectureManipulator)Activator.CreateInstance(availableOperatorType), true);
     81      }
    8082    }
    8183
     
    102104      }
    103105    }
    104 
    105     public override IOperation Apply() {
    106       if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one symbolic expression tree manipulator to choose from.");
    107       return base.Apply();
    108     }
    109106  }
    110107}
Note: See TracChangeset for help on using the changeset viewer.