Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 3742)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/RampedTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/RampedTreeCreator.cs	(revision 3722)
+++ 	(revision )
@@ -1,69 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using System;
-using HeuristicLab.Random;
-using System.Diagnostics;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  public class RampedTreeCreator : OperatorBase {
-    public override string Description {
-      get { return @"Generates a new random operator tree."; }
-    }
-
-    public RampedTreeCreator()
-      : base() {
-      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionLibrary", "The function library containing all available functions", typeof(FunctionLibrary), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MinTreeHeight", "The minimal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The created tree", typeof(IGeneticProgrammingModel), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("TreeHeight", "The height of the tree", typeof(IntData), VariableKind.New | VariableKind.Out));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      IRandom random = GetVariableValue<IRandom>("Random", scope, true);
-      FunctionLibrary opLibrary = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
-      int minTreeHeight = GetVariableValue<IntData>("MinTreeHeight", scope, true).Data;
-      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
-      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
-
-      TreeGardener gardener = new TreeGardener(random, opLibrary);
-
-      int treeHeight = random.Next(minTreeHeight, maxTreeHeight + 1);
-      IFunctionTree root;
-      if(random.NextDouble() <= balancedTreesRate) {
-        root = gardener.CreateBalancedRandomTree(Int32.MaxValue, treeHeight);
-      } else {
-        root = gardener.CreateUnbalancedRandomTree(Int32.MaxValue, treeHeight);
-      }
-
-      Debug.Assert(gardener.IsValidTree(root) && root.GetHeight() <= maxTreeHeight);
-
-      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), new GeneticProgrammingModel(root)));
-      return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(root), scope);
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/LangdonHomologousCrossOver.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/LangdonHomologousCrossOver.cs	(revision 3722)
+++ 	(revision )
@@ -1,56 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Random;
-using HeuristicLab.GP.Interfaces;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  /// <summary>
-  /// Implementation of a homologous crossover operator as described in: 
-  /// William B. Langdon 
-  /// Size Fair and Homologous Tree Genetic Programming Crossovers, 
-  /// Genetic Programming and Evolvable Machines, Vol. 1, Number 1/2, pp. 95-119, April 2000
-  /// </summary>
-  public class LangdonHomologousCrossOver : SizeFairCrossOver {
-    protected override IFunctionTree SelectReplacement(MersenneTwister random, List<int> replacedTrail, List<CrossoverPoint> crossoverPoints) {
-      List<CrossoverPoint> bestPoints = new List<CrossoverPoint> { crossoverPoints[0] };
-      int bestMatchLength = MatchingSteps(replacedTrail, crossoverPoints[0].trail);
-      for (int i = 1; i < crossoverPoints.Count; i++) {
-        int currentMatchLength = MatchingSteps(replacedTrail, crossoverPoints[i].trail);
-        if (currentMatchLength > bestMatchLength) {
-          bestMatchLength = currentMatchLength;
-          bestPoints.Clear();
-          bestPoints.Add(crossoverPoints[i]);
-        } else if (currentMatchLength == bestMatchLength) {
-          bestPoints.Add(crossoverPoints[i]);
-        }
-      }
-      return bestPoints[random.Next(bestPoints.Count)].tree;
-    }
-    private int MatchingSteps(List<int> t1, List<int> t2) {
-      int n = Math.Min(t1.Count, t2.Count);
-      for (int i = 0; i < n; i++) if (t1[i] != t2[i]) return i;
-      return n;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/OnePointCrossOver.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/OnePointCrossOver.cs	(revision 3722)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.GP.Interfaces;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  /// <summary>
-  /// Implementation of a homologous one point crossover operator as described in: 
-  /// W. B. Langdon and R. Poli.  Foundations of Genetic Programming. Springer-Verlag, 2002.
-  /// </summary>
-  public class OnePointCrossOver : SizeConstrictedGPCrossoverBase {
-    // internal data structure to represent crossover points
-    private class CrossoverPoint {
-      public IFunctionTree parent0;
-      public IFunctionTree parent1;
-      public int childIndex;
-    }
-    public override string Description {
-      get {
-        return @"One point crossover for trees as described in W. B. Langdon and R. Poli. Foundations of Genetic Programming. Springer-Verlag, 2002.";
-      }
-    }
-
-    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
-      List<CrossoverPoint> allowedCrossOverPoints = new List<CrossoverPoint>();
-      GetCrossOverPoints(gardener, tree0, tree1, maxTreeSize - tree0.GetSize(), allowedCrossOverPoints);
-      if (allowedCrossOverPoints.Count > 0) {
-        CrossoverPoint crossOverPoint = allowedCrossOverPoints[random.Next(allowedCrossOverPoints.Count)];
-        IFunctionTree parent0 = crossOverPoint.parent0;
-        IFunctionTree branch1 = crossOverPoint.parent1.SubTrees[crossOverPoint.childIndex];
-        parent0.RemoveSubTree(crossOverPoint.childIndex);
-        parent0.InsertSubTree(crossOverPoint.childIndex, branch1);
-      }
-      return tree0;
-    }
-
-    private void GetCrossOverPoints(TreeGardener gardener, IFunctionTree branch0, IFunctionTree branch1, int maxNewNodes, List<CrossoverPoint> crossoverPoints) {
-      if (branch0.SubTrees.Count != branch1.SubTrees.Count) return;
-
-      for (int i = 0; i < branch0.SubTrees.Count; i++) {
-        // if the current branch can be attached as a sub-tree to branch0
-        if (gardener.GetAllowedSubFunctions(branch0.Function, i).Contains(branch1.SubTrees[i].Function) &&
-           branch1.SubTrees[i].GetSize() - branch0.SubTrees[i].GetSize() <= maxNewNodes) {
-          CrossoverPoint p = new CrossoverPoint();
-          p.childIndex = i;
-          p.parent0 = branch0;
-          p.parent1 = branch1;
-          crossoverPoints.Add(p);
-        }
-        GetCrossOverPoints(gardener, branch0.SubTrees[i], branch1.SubTrees[i], maxNewNodes, crossoverPoints);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SizeConstrictedGPCrossoverBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SizeConstrictedGPCrossoverBase.cs	(revision 3722)
+++ 	(revision )
@@ -1,59 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.GP.Interfaces;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  public abstract class SizeConstrictedGPCrossoverBase : GPCrossoverBase {
-
-    private int MaxRecombinationTries { get { return 20; } }
-
-    public SizeConstrictedGPCrossoverBase()
-      : base() {
-      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-    }
-
-    internal override IFunctionTree Cross(IScope scope, TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1) {
-      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
-      int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
-
-      // when tree0 is terminal then try to cross into tree1, when tree1 is also terminal just return tree0 unchanged.
-      IFunctionTree newTree;
-      int tries = 0;
-      do {
-        if (tries++ > MaxRecombinationTries)
-          // if after so many tries it was not possible to create a solution within the given size constraints just return the tree without changes.
-          return tree0;
-        if (tree0.SubTrees.Count > 0) {
-          newTree = Cross(gardener, random, (IFunctionTree)tree0.Clone(), (IFunctionTree)tree1.Clone(), maxTreeSize, maxTreeHeight);
-        } else if (tree1.SubTrees.Count > 0) {
-          newTree = Cross(gardener, random, (IFunctionTree)tree1.Clone(), (IFunctionTree)tree0.Clone(), maxTreeSize, maxTreeHeight);
-        } else newTree = tree0;
-      } while (newTree.GetSize() > maxTreeSize || newTree.GetHeight() > maxTreeHeight);
-      return newTree;
-    }
-
-    internal abstract IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight);
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SizeFairCrossOver.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SizeFairCrossOver.cs	(revision 3722)
+++ 	(revision )
@@ -1,148 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Core;
-using HeuristicLab.GP.Interfaces;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  /// <summary>
-  /// Implementation of a size fair crossover operator as described in: 
-  /// William B. Langdon 
-  /// Size Fair and Homologous Tree Genetic Programming Crossovers, 
-  /// Genetic Programming and Evolvable Machines, Vol. 1, Number 1/2, pp. 95-119, April 2000
-  /// </summary>
-  public class SizeFairCrossOver : SizeConstrictedGPCrossoverBase {
-    private int MaxRecombinationTries { get { return 20; } }
-    // private data structure for crossover points
-    protected class CrossoverPoint {
-      public IFunctionTree tree;
-      public int branchSize;
-      public List<int> trail;
-    }
-
-    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
-      int tries = 0;
-      IFunctionTree insertedBranch = null;
-      IFunctionTree parent = null;
-      int removedBranchIndex = 0;
-      do {
-        // select a random suboperator of the 'receiving' tree
-        while (parent == null) parent = gardener.GetRandomParentNode(tree0);
-        removedBranchIndex = random.Next(parent.SubTrees.Count);
-        insertedBranch = GetReplacementBranch((MersenneTwister)random, gardener, tree0, parent, removedBranchIndex, tree1, maxTreeSize, maxTreeHeight);
-      } while (insertedBranch == null && tries++ < MaxRecombinationTries);
-
-      if (insertedBranch != null) {
-        // replace the branch below the crossoverpoint with the selected branch from root1
-        parent.RemoveSubTree(removedBranchIndex);
-        parent.InsertSubTree(removedBranchIndex, insertedBranch);
-      }
-      return tree0;
-    }
-
-    private IFunctionTree GetReplacementBranch(MersenneTwister random, TreeGardener gardener, IFunctionTree intoTree, IFunctionTree parent, int replacedBranchIndex, IFunctionTree fromTree, int maxTreeSize, int maxTreeHeight) {
-      IList<IFunction> allowedFunctions = new List<IFunction>(gardener.GetAllowedSubFunctions(parent.Function, replacedBranchIndex));
-      int removedBranchSize = parent.SubTrees[replacedBranchIndex].GetSize();
-      int maxBranchSize = maxTreeSize - (intoTree.GetSize() - removedBranchSize);
-      int maxBranchHeight = maxTreeHeight - gardener.GetBranchLevel(intoTree, parent);  // returns 1 if intoTree==parent and 2 if parent is a child of intoTree
-      List<int> replacedTrail = GetTrail(intoTree, parent);
-      replacedTrail.Add(replacedBranchIndex);
-
-      List<CrossoverPoint> shorterBranches = new List<CrossoverPoint>();
-      List<CrossoverPoint> longerBranches = new List<CrossoverPoint>();
-      List<CrossoverPoint> equalLengthBranches = new List<CrossoverPoint>();
-
-      FindPossibleBranches(fromTree, allowedFunctions, maxBranchSize, maxBranchHeight, removedBranchSize, shorterBranches, equalLengthBranches, longerBranches, new List<int>());
-
-      if (shorterBranches.Count > 0 && longerBranches.Count > 0) {
-        double pEqualLength = equalLengthBranches.Count > 0 ? 1.0 / removedBranchSize : 0.0;
-        double pLonger;
-        if (parent.GetSize() == maxTreeSize) {
-          pLonger = 0.0;
-        } else {
-          pLonger = (1.0 - pEqualLength) / (longerBranches.Count * (1.0 + longerBranches.Average(p => p.branchSize) / shorterBranches.Average(p => p.branchSize)));
-        }
-        double pShorter = (1.0 - pEqualLength - pLonger);
-
-        double r = random.NextDouble();
-        if (r < pLonger) {
-          return SelectReplacement(random, replacedTrail, longerBranches);
-        } else if (r < pLonger + pShorter) {
-          return SelectReplacement(random, replacedTrail, shorterBranches);
-        } else {
-          return SelectReplacement(random, replacedTrail, equalLengthBranches);
-        }
-      } else if (equalLengthBranches.Count > 0) {
-        return SelectReplacement(random, replacedTrail, equalLengthBranches);
-      } else {
-        return null;
-      }
-    }
-
-    protected virtual IFunctionTree SelectReplacement(MersenneTwister random, List<int> replacedTrail, List<CrossoverPoint> crossoverPoints) {
-      return crossoverPoints[random.Next(crossoverPoints.Count)].tree;
-    }
-
-    private void FindPossibleBranches(IFunctionTree tree, IList<IFunction> allowedFunctions, int maxBranchSize, int maxBranchHeight, int removedBranchSize,
-      List<CrossoverPoint> shorterBranches, List<CrossoverPoint> equalLengthBranches, List<CrossoverPoint> longerBranches, List<int> trail) {
-      int treeSize = tree.GetSize();
-      if (allowedFunctions.Contains(tree.Function) && treeSize <= maxBranchSize && tree.GetHeight() <= maxBranchHeight) {
-        CrossoverPoint p = new CrossoverPoint();
-        p.branchSize = treeSize;
-        p.tree = tree;
-        p.trail = new List<int>(trail);
-        if (treeSize < removedBranchSize) shorterBranches.Add(p);
-        else if (treeSize > removedBranchSize) longerBranches.Add(p);
-        else equalLengthBranches.Add(p);
-      }
-      for (int i = 0; i < tree.SubTrees.Count; i++) {
-        trail.Add(i);
-        FindPossibleBranches(tree.SubTrees[i], allowedFunctions, maxBranchSize, maxBranchHeight, removedBranchSize, shorterBranches, equalLengthBranches, longerBranches, trail);
-        trail.RemoveAt(trail.Count - 1);
-      }
-    }
-
-    private List<int> GetTrail(IFunctionTree root, IFunctionTree branch) {
-      List<int> trail = new List<int>();
-      GetTrail(root, branch, trail);
-      trail.Reverse();
-      trail.RemoveAt(trail.Count - 1);
-      return trail;
-    }
-    private void GetTrail(IFunctionTree root, IFunctionTree branch, List<int> trail) {
-      if (root == branch) {
-        trail.Add(-1); // add flag that there was a match
-        return;
-      }
-
-      for (int i = 0; i < root.SubTrees.Count; i++) {
-        GetTrail(root.SubTrees[i], branch, trail);
-        if (trail.Count > 0) {
-          trail.Add(i);
-          return;
-        }
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/UniformCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/UniformCrossover.cs	(revision 3722)
+++ 	(revision )
@@ -1,154 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  /// <summary>
-  /// Implementation of a homologous uniform crossover operator as described in: 
-  /// R. Poli and W. B. Langdon.  On the Search Properties of Different Crossover Operators in Genetic Programming.
-  /// In Proceedings of Genetic Programming '98, Madison, Wisconsin, 1998.
-  /// </summary>
-  public class UniformCrossover : SizeConstrictedGPCrossoverBase {
-    // internal datastructure to represent crossover points
-    private class CrossoverPoint {
-      public IFunctionTree Parent0;
-      public IFunctionTree Parent1;
-      public int ChildIndex;
-      public bool IsInternal;
-    }
-
-    public override string Description {
-      get {
-        return @"Uniform crossover as defined by Poli and Langdon";
-      }
-    }
-
-    internal override IFunctionTree Cross(TreeGardener gardener, IRandom random, IFunctionTree tree0, IFunctionTree tree1, int maxTreeSize, int maxTreeHeight) {
-      List<CrossoverPoint> allowedCrossOverPoints = new List<CrossoverPoint>();
-      GetCrossOverPoints(gardener, tree0, tree1, allowedCrossOverPoints);
-      // iterate through the list of crossover points and swap nodes with p=0.5
-      foreach (CrossoverPoint crossoverPoint in allowedCrossOverPoints) {
-        if (random.NextDouble() < 0.5) {
-          if (crossoverPoint.IsInternal) {
-            ExchangeNodes(crossoverPoint);
-          } else {
-            SwapSubtrees(crossoverPoint);
-          }
-        }
-      }
-      return tree0;
-    }
-
-    private void GetCrossOverPoints(TreeGardener gardener, IFunctionTree branch0, IFunctionTree branch1, List<CrossoverPoint> crossoverPoints) {
-      if (branch0.SubTrees.Count != branch1.SubTrees.Count) return; // branches have to have same number of sub-trees to be valid crossover points
-      // iterate over all sub-trees
-      for (int i = 0; i < branch0.SubTrees.Count; i++) {
-        IFunctionTree currentSubTree0 = branch0.SubTrees[i];
-        IFunctionTree currentSubTree1 = branch1.SubTrees[i];
-        // when the current sub-tree in branch1 can be attached as a child of branch0
-        // and the sub-tree of branch0 can be attached as child of branch1.
-        // note: we have to check both cases because either branch0 or branch1 can end up in the result tree
-        if (gardener.GetAllowedSubFunctions(branch0.Function, i).Contains(currentSubTree1.Function) &&
-          gardener.GetAllowedSubFunctions(branch1.Function, i).Contains(currentSubTree0.Function)) {
-          // and the sub-tree is at the border of the common region 
-          if (currentSubTree0.SubTrees.Count != currentSubTree1.SubTrees.Count) {
-            // then we have found a valid crossover point
-            CrossoverPoint p = new CrossoverPoint();
-            p.ChildIndex = i;
-            p.Parent0 = branch0;
-            p.Parent1 = branch1;
-            p.IsInternal = false;
-            crossoverPoints.Add(p);
-          } else {
-            // when the sub-trees are not on the border of the common region
-            // we also have to check if the children of the current sub-trees of branch0 and branch1 can be exchanged 
-            if (CanHaveSubTrees(gardener, currentSubTree0, currentSubTree1.SubTrees) &&
-              CanHaveSubTrees(gardener, currentSubTree1, currentSubTree0.SubTrees)) {
-              CrossoverPoint p = new CrossoverPoint();
-              p.ChildIndex = i;
-              p.Parent0 = branch0;
-              p.Parent1 = branch1;
-              p.IsInternal = true;
-              crossoverPoints.Add(p);
-            }
-          }
-        }
-        GetCrossOverPoints(gardener, currentSubTree0, currentSubTree1, crossoverPoints);
-      }
-    }
-
-    private bool CanHaveSubTrees(TreeGardener gardener, IFunctionTree parent, IList<IFunctionTree> subTrees) {
-      for (int i = 0; i < subTrees.Count; i++) {
-        if (!gardener.GetAllowedSubFunctions(parent.Function, i).Contains(subTrees[i].Function)) return false;
-      }
-      return true;
-    }
-
-    private void ExchangeNodes(CrossoverPoint crossoverPoint) {
-      IFunctionTree parent0 = crossoverPoint.Parent0;
-      IFunctionTree parent1 = crossoverPoint.Parent1;
-      int childIndex = crossoverPoint.ChildIndex;
-      IFunctionTree branch0 = crossoverPoint.Parent0.SubTrees[childIndex];
-      IFunctionTree branch1 = crossoverPoint.Parent1.SubTrees[childIndex];
-      // exchange the branches in the parent
-      parent0.RemoveSubTree(childIndex);
-      parent0.InsertSubTree(childIndex, branch1);
-      parent1.RemoveSubTree(childIndex);
-      parent1.InsertSubTree(childIndex, branch0);
-
-      ExchangeChildren(branch0, branch1);
-    }
-
-    private void SwapSubtrees(CrossoverPoint crossoverPoint) {
-      IFunctionTree parent0 = crossoverPoint.Parent0;
-      IFunctionTree parent1 = crossoverPoint.Parent1;
-      int childIndex = crossoverPoint.ChildIndex;
-      IFunctionTree branch0 = crossoverPoint.Parent0.SubTrees[childIndex];
-      IFunctionTree branch1 = crossoverPoint.Parent1.SubTrees[childIndex];
-      // insert branch1 into parent0 replacing branch0
-      parent0.RemoveSubTree(childIndex);
-      parent0.InsertSubTree(childIndex, branch1);
-      // insert branch0 into parent1 replacing branch1
-      parent1.RemoveSubTree(childIndex);
-      parent1.InsertSubTree(childIndex, branch0);
-    }
-
-    private void ExchangeChildren(IFunctionTree branch0, IFunctionTree branch1) {
-      List<IFunctionTree> branch0Children = new List<IFunctionTree>(branch0.SubTrees); // lists to backup subtrees
-      List<IFunctionTree> branch1Children = new List<IFunctionTree>(branch1.SubTrees);
-
-      // remove children of branch0 and branch1
-      while (branch1.SubTrees.Count > 0) branch1.RemoveSubTree(0);
-      while (branch0.SubTrees.Count > 0) branch0.RemoveSubTree(0);
-
-      // add original children of branch0 to branch1
-      foreach (IFunctionTree subTree in branch0Children) {
-        branch1.AddSubTree(subTree);
-      }
-      // add original children of branch1 to branch0
-      foreach (IFunctionTree subTree in branch1Children) {
-        branch0.AddSubTree(subTree);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/EnumerableExtensions.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/EnumerableExtensions.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/EnumerableExtensions.cs	(revision 3742)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/CutOutNodeManipulation.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/CutOutNodeManipulation.cs	(revision 3722)
+++ 	(revision )
@@ -1,111 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Core;
-using HeuristicLab.Random;
-using System.Diagnostics;
-using HeuristicLab.GP.Interfaces;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  public class CutOutNodeManipulation : GPManipulatorBase {
-    public override string Description {
-      get {
-        return @"Takes a tree, selects a random node of the tree and then tries to replace a random sub-tree
-of that node with one of the childs of the selected child.
-
-               O                             O
-              / \                           / \
-             O   X                         O   2
-                / \    2 is selected =>       / \
-               1   2                         4   5
-              /   / \
-             3   4   5
-";
-      }
-    }
-
-    public CutOutNodeManipulation()
-      : base() {
-    }
-
-
-    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
-      TreeGardener gardener = new TreeGardener(random, library);
-      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
-      // parent == null means we should cut out the root node
-      // => return a random sub-tree of the root
-      if (parent == null) {
-        // when there are sub-trees then replace the old tree with a random sub-tree
-        if (gpModel.FunctionTree.SubTrees.Count > 0) {
-          gpModel.FunctionTree = gpModel.FunctionTree.SubTrees[random.Next(gpModel.FunctionTree.SubTrees.Count)];
-          Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-          // we reused a sub-tree so we don't have to schedule initialization operations
-          return null;
-        } else {
-          // we want to cut the root node and there are no sub-trees => create a new random terminal
-          gpModel.FunctionTree = gardener.CreateRandomTree(gardener.Terminals, 1, 1);
-          Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-
-          // schedule an operation to initialize the whole tree
-          return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(gpModel.FunctionTree), scope);
-        }
-      }
-
-      // select a child to cut away
-      int childIndex = random.Next(parent.SubTrees.Count);
-      IFunctionTree child = parent.SubTrees[childIndex];
-      // match the sub-trees of the child with the allowed sub-trees of the parent
-      ICollection<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
-      IFunctionTree[] possibleChilds = child.SubTrees.Where(t => allowedFunctions.Contains(t.Function)).ToArray();
-      if (possibleChilds.Length > 0) {
-        // replace child with a random child of that child
-        IFunctionTree selectedChild = possibleChilds[random.Next(possibleChilds.Length)];
-        parent.RemoveSubTree(childIndex);
-        parent.InsertSubTree(childIndex, selectedChild);
-        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-        // recalculate the size and height of our tree
-        gpModel.Size = gpModel.FunctionTree.GetSize();
-        gpModel.Height = gpModel.FunctionTree.GetHeight();
-        // don't need to schedule initialization operations
-        return null;
-      } else {
-        // can't reuse an existing branch => create a new tree
-        // determine the level of the parent
-        int parentLevel = gardener.GetBranchLevel(gpModel.FunctionTree, parent);
-        // first remove the old child (first step essential!)
-        parent.RemoveSubTree(childIndex);
-        // then determine the number of nodes left over after the child has been removed!
-        int remainingNodes = gpModel.FunctionTree.GetSize();
-        allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
-        IFunctionTree newFunctionTree = gardener.CreateRandomTree(allowedFunctions, maxTreeSize - remainingNodes, maxTreeHeight - parentLevel);
-        parent.InsertSubTree(childIndex, newFunctionTree);
-        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-        // recalculate size and height
-        gpModel.Size = gpModel.FunctionTree.GetSize();
-        gpModel.Height = gpModel.FunctionTree.GetHeight();
-        // schedule an initialization operation for the new function-tree
-        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/DeleteSubTreeManipulation.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/DeleteSubTreeManipulation.cs	(revision 3722)
+++ 	(revision )
@@ -1,87 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.Random;
-using System.Diagnostics;
-using HeuristicLab.GP.Interfaces;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  public class DeleteSubTreeManipulation : GPManipulatorBase {
-    public override string Description {
-      get {
-        return @"Deletes a random sub-tree of the input tree. If the remaining tree is not valid 
-the operator tries to fix the tree by generating random subtrees where necessary.";
-      }
-    }
-
-    public DeleteSubTreeManipulation()
-      : base() {
-    }
-
-    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
-      TreeGardener gardener = new TreeGardener(random, library);
-      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
-
-      // parent==null means the whole tree should be deleted.
-      // => return a new minimal random tree
-      if (parent == null) {
-        IFunctionTree newTree = gardener.CreateBalancedRandomTree(1, 1);
-        // check if the tree is ok
-        Debug.Assert(gardener.IsValidTree(newTree));
-        gpModel.FunctionTree = newTree;
-        // schedule an operation to initialize the newly created operator
-        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);
-      }
-
-      // select a branch to prune
-      int childIndex = random.Next(parent.SubTrees.Count);
-      if (parent.SubTrees.Count > parent.Function.MinSubTrees) {
-        parent.RemoveSubTree(childIndex);
-        // actually since the next sub-trees are shifted in the place of the removed branch
-        // it might be possible that these sub-trees are not allowed in the place of the old branch
-        // we ignore this problem for now.
-        // when this starts to become a problem a possible solution is to go through the shifted branches from the place of the shifted
-        // and find the first one that doesn't fit. At this position we insert a new randomly initialized subtree of matching type (gkronber 25.12.07)
-
-        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-        // recalculate size and height
-        gpModel.Size = gpModel.FunctionTree.GetSize();
-        gpModel.Height = gpModel.FunctionTree.GetHeight();
-        // root hasn't changed so don't need to update 'FunctionTree' variable
-        return null;
-      } else {
-        // replace with a minimal random seedling
-        parent.RemoveSubTree(childIndex);
-        ICollection<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
-        IFunctionTree newFunctionTree = gardener.CreateRandomTree(allowedFunctions, 1, 1);
-        parent.InsertSubTree(childIndex, newFunctionTree);
-        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-        // recalculate size and height
-        gpModel.Size = gpModel.FunctionTree.GetSize();
-        gpModel.Height = gpModel.FunctionTree.GetHeight();
-        // return an initialization operation for the newly created tree
-        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/GPManipulatorBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/GPManipulatorBase.cs	(revision 3722)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Random;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  public abstract class GPManipulatorBase : OperatorBase {
-    public GPManipulatorBase()
-      : base() {
-      AddVariableInfo(new VariableInfo("Random", "Uniform random number generator", typeof(MersenneTwister), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionLibrary", "The operator library containing all available operators", typeof(FunctionLibrary), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("FunctionTree", "The tree to crossover", typeof(IGeneticProgrammingModel), VariableKind.In | VariableKind.New));
-    }
-
-    internal abstract IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxSize, int maxHeight, IScope scope);
-
-    public override IOperation Apply(IScope scope) {
-      FunctionLibrary funLibrary = GetVariableValue<FunctionLibrary>("FunctionLibrary", scope, true);
-      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, false);
-      MersenneTwister random = GetVariableValue<MersenneTwister>("Random", scope, true);
-      int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
-      int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
-
-      return Manipulate(random, gpModel, funLibrary, maxTreeSize, maxTreeHeight, scope);
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SubstituteSubTreeManipulation.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SubstituteSubTreeManipulation.cs	(revision 3722)
+++ 	(revision )
@@ -1,84 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.Random;
-using System.Diagnostics;
-using HeuristicLab.GP.Interfaces;
-
-namespace HeuristicLab.Encodings.SymbolicExpressionTree {
-  public class SubstituteSubTreeManipulation : GPManipulatorBase {
-
-    public override string Description {
-      get { return "Selects a random node of the tree and replaces it with randomly initialized subtree."; }
-    }
-
-    public SubstituteSubTreeManipulation()
-      : base() {
-    }
-
-    internal override IOperation Manipulate(MersenneTwister random, IGeneticProgrammingModel gpModel, FunctionLibrary library, int maxTreeSize, int maxTreeHeight, IScope scope) {
-      TreeGardener gardener = new TreeGardener(random, library);
-      IFunctionTree parent = gardener.GetRandomParentNode(gpModel.FunctionTree);
-      if (parent == null) {
-        // parent == null means we should subsitute the whole tree
-        // => create a new random tree
-        IFunctionTree newTree = gardener.CreateRandomTree(gardener.AllFunctions, maxTreeSize, maxTreeHeight);
-        Debug.Assert(gardener.IsValidTree(newTree));
-
-        gpModel.FunctionTree = newTree;
-        // return a CompositeOperation that randomly initializes the new tree
-        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);
-      } else {
-        // determine a random child of the parent to be replaced
-        int childIndex = random.Next(parent.SubTrees.Count);
-        // get the list of allowed functions for the new sub-tree
-        ICollection<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent.Function, childIndex);
-        if (allowedFunctions.Count == 0) {
-          // don't change anything
-          // this shouldn't happen
-          throw new InvalidProgramException();
-        }
-
-        // calculate the maximum size and height of the new sub-tree based on the location where
-        // it will be inserted
-        int parentLevel = gardener.GetBranchLevel(gpModel.FunctionTree, parent);
-        int maxSubTreeHeight = maxTreeHeight - parentLevel;
-        int maxSubTreeSize = maxTreeSize - (gpModel.Size - parent.SubTrees[childIndex].GetSize());
-
-        // create a random function tree
-        IFunctionTree newTree = gardener.CreateRandomTree(allowedFunctions, maxSubTreeSize, maxSubTreeHeight);
-        parent.RemoveSubTree(childIndex);
-        parent.InsertSubTree(childIndex, newTree);
-
-        Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree));
-        // update the values of treeSize and treeHeight
-        gpModel.Size = gpModel.FunctionTree.GetSize();
-        gpModel.Height = gpModel.FunctionTree.GetHeight();
-        // the root hasn't changed so we don't need to update 
-        // return a CompositeOperation that randomly initializes all nodes of the new subtree
-        return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs	(revision 3742)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs	(revision 3742)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs	(revision 3742)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 3742)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3722)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3742)
@@ -1,3 +1,24 @@
-﻿using System.Reflection;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
