Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3674


Ignore:
Timestamp:
05/06/10 16:32:31 (15 years ago)
Author:
mkommend
Message:

adapted MultiCrossover and MultiManipulators for all encodings to be filled and check in ctors (ticket #979)

Location:
trunk/sources
Files:
8 edited

Legend:

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

    r3659 r3674  
    2828using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.PluginInfrastructure;
    3031
    3132namespace HeuristicLab.Encodings.BinaryVectorEncoding {
     
    5657      Parameters.Add(new LookupParameter<BinaryVector>("Child", "The child binary vector resulting from the crossover."));
    5758      ChildParameter.ActualName = "BinaryVector";
     59
     60      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IBinaryVectorCrossover))) {
     61        if (!typeof(MultiOperator<IBinaryVectorCrossover>).IsAssignableFrom(type))
     62          Operators.Add((IBinaryVectorCrossover)Activator.CreateInstance(type), true);
     63      }
    5864    }
    5965
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/MultiIntegerVectorCrossover.cs

    r3659 r3674  
    2828using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.PluginInfrastructure;
    3031
    3132namespace HeuristicLab.Encodings.IntegerVectorEncoding {
     
    5657      Parameters.Add(new LookupParameter<IntegerVector>("Child", "The child integer vector resulting from the crossover."));
    5758      ChildParameter.ActualName = "IntegerVector";
     59
     60      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IIntegerVectorCrossover))) {
     61        if (!typeof(MultiOperator<IIntegerVectorCrossover>).IsAssignableFrom(type))
     62          Operators.Add((IIntegerVectorCrossover)Activator.CreateInstance(type), true);
     63      }
    5864    }
    5965
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MultiPermutationCrossover.cs

    r3659 r3674  
    2828using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.PluginInfrastructure;
    3031
    3132namespace HeuristicLab.Encodings.PermutationEncoding {
     
    5657      Parameters.Add(new LookupParameter<Permutation>("Child", "The child permutation resulting from the crossover."));
    5758      ChildParameter.ActualName = "Permutation";
     59
     60      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IPermutationCrossover))) {
     61        if (!typeof(MultiOperator<IPermutationCrossover>).IsAssignableFrom(type))
     62          Operators.Add((IPermutationCrossover)Activator.CreateInstance(type), true);
     63      }
    5864    }
    5965
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/MultiPermutationManipulator.cs

    r3593 r3674  
    2828using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.PluginInfrastructure;
    3031
    3132namespace HeuristicLab.Encodings.PermutationEncoding {
     
    4950      : base() {
    5051      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation that is being manipulating."));
     52
     53      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IPermutationManipulator))) {
     54        if (!typeof(MultiOperator<IPermutationManipulator>).IsAssignableFrom(type))
     55          Operators.Add((IPermutationManipulator)Activator.CreateInstance(type), true);
     56      }
    5157    }
    5258
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/MultiRealVectorCrossover.cs

    r3659 r3674  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.PluginInfrastructure;
    3132
    3233namespace HeuristicLab.Encodings.RealVectorEncoding {
     
    6061      ChildParameter.ActualName = "RealVector";
    6162      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the vector."));
     63
     64      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IRealVectorCrossover))) {
     65        if (!typeof(MultiOperator<IRealVectorCrossover>).IsAssignableFrom(type))
     66          Operators.Add((IRealVectorCrossover)Activator.CreateInstance(type), true);
     67      }
    6268    }
    6369
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MultiRealVectorManipulator.cs

    r3593 r3674  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.PluginInfrastructure;
    3132
    3233namespace HeuristicLab.Encodings.RealVectorEncoding {
     
    5455      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The real vector that is being manipulating."));
    5556      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the vector."));
     57
     58      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IRealVectorManipulator))) {
     59        if (!typeof(MultiOperator<IRealVectorManipulator>).IsAssignableFrom(type))
     60          Operators.Add((IRealVectorManipulator)Activator.CreateInstance(type), true);
     61      }
    5662    }
    5763
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs

    r3596 r3674  
    8888      Parameters.Add(new ValueLookupParameter<IntValue>(MaxTreeHeightParameterName, "The maximal height of the symbolic expression tree (a tree with one node has height = 0)."));
    8989      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionGrammarParameterName, "The grammar that defines the allowed symbols and syntax of the symbolic expression trees."));
     90
     91      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeArchitectureManipulator))) {
     92        if (!typeof(MultiOperator<ISymbolicExpressionTreeArchitectureManipulator>).IsAssignableFrom(type))
     93          Operators.Add((ISymbolicExpressionTreeArchitectureManipulator)Activator.CreateInstance(type), true);
     94      }
    9095    }
    9196
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs

    r3596 r3674  
    7575      Parameters.Add(new ValueLookupParameter<IntValue>(MaxTreeHeightParameterName, "The maximal height of the symbolic expression tree (a tree with one node has height = 0)."));
    7676      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionGrammarParameterName, "The grammar that defines the allowed symbols and syntax of the symbolic expression trees."));
     77
     78      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeManipulator))) {
     79        if (!typeof(MultiOperator<ISymbolicExpressionTreeManipulator>).IsAssignableFrom(type) && !typeof(ISymbolicExpressionTreeArchitectureManipulator).IsAssignableFrom(type))
     80          Operators.Add((ISymbolicExpressionTreeManipulator)Activator.CreateInstance(type), true);
     81      }
    7782    }
    7883
Note: See TracChangeset for help on using the changeset viewer.