Index: /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs
===================================================================
--- /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs	(revision 2337)
+++ /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs	(revision 2337)
@@ -0,0 +1,94 @@
+﻿#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.DataAnalysis;
+using HeuristicLab.GP.Interfaces;
+using HeuristicLab.Operators;
+using HeuristicLab.Modeling;
+using HeuristicLab.Logging;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  internal static class DefaultStructureIdentificationAlgorithmOperators {
+    internal static IOperator CreateFunctionLibraryInjector() {
+      CombinedOperator op = new CombinedOperator();
+      op.Name = "FunctionLibraryInjector";
+      SequentialProcessor seq = new SequentialProcessor();
+      seq.AddSubOperator(new FunctionLibraryInjector());
+      seq.AddSubOperator(new HL2TreeEvaluatorInjector());
+      op.OperatorGraph.AddOperator(seq);
+      op.OperatorGraph.InitialOperator = seq;
+      return op;
+    }
+
+    internal static IOperator CreateProblemInjector() {
+      return new ProblemInjector();
+    }
+
+    internal static IOperator CreateInitialPopulationEvaluator() {
+      MeanSquaredErrorEvaluator eval = new MeanSquaredErrorEvaluator();
+      eval.Name = "Evaluator";
+      eval.GetVariableInfo("MSE").ActualName = "Quality";
+      eval.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
+      eval.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
+      return eval;
+    }
+
+    internal static IOperator CreateEvaluator() {
+      return CreateInitialPopulationEvaluator();
+    }
+
+    internal static IOperator CreateGenerationStepHook() {
+      CombinedOperator op = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformSequentialSubScopesProcessor subScopesProc = new UniformSequentialSubScopesProcessor();
+      SequentialProcessor individualProc = new SequentialProcessor();
+      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
+      validationEvaluator.Name = "ValidationEvaluator";
+      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
+      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+
+      individualProc.AddSubOperator(validationEvaluator);
+
+      BestSolutionStorer solutionStorer = new BestSolutionStorer();
+      solutionStorer.GetVariableInfo("BestSolution").ActualName = "BestValidationSolution";
+      solutionStorer.GetVariableInfo("Quality").ActualName = "ValidationQuality";
+
+      BestAverageWorstQualityCalculator validationQualityCalculator = new BestAverageWorstQualityCalculator();
+      validationQualityCalculator.Name = "BestAverageWorstValidationQualityCalculator";
+      validationQualityCalculator.GetVariableInfo("Quality").ActualName = "ValidationQuality";
+      validationQualityCalculator.GetVariableInfo("BestQuality").ActualName = "BestValidationQuality";
+      validationQualityCalculator.GetVariableInfo("AverageQuality").ActualName = "AverageValidationQuality";
+      validationQualityCalculator.GetVariableInfo("WorstQuality").ActualName = "WorstValidationQuality";
+
+      subScopesProc.AddSubOperator(individualProc);
+
+      seq.AddSubOperator(subScopesProc);
+      seq.AddSubOperator(solutionStorer);
+      seq.AddSubOperator(validationQualityCalculator);
+
+      op.OperatorGraph.AddOperator(seq);
+      op.OperatorGraph.InitialOperator = seq;
+      return op;
+    }
+  }
+}
Index: /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj
===================================================================
--- /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj	(revision 2336)
+++ /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj	(revision 2337)
@@ -84,4 +84,5 @@
     <Compile Include="BaseClasses\FunctionTreeBase.cs" />
     <Compile Include="BaseClasses\TreeEvaluatorBase.cs" />
+    <Compile Include="IStructureIdentificationAlgorithm.cs" />
     <Compile Include="HL3TreeEvaluatorInjector.cs" />
     <Compile Include="HL2TreeEvaluatorInjector.cs" />
Index: /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs
===================================================================
--- /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs	(revision 2336)
+++ /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGP.cs	(revision 2337)
@@ -35,4 +35,26 @@
     public override string Name { get { return "OffspringSelectionGP - StructureIdentification"; } }
 
+    public HeuristicLab.DataAnalysis.Dataset Dataset {
+      get {
+        throw new NotImplementedException();
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public int TargetVariable {
+      get {
+        throw new NotImplementedException();
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public IAnalyzerModel Model {
+      get { throw new NotImplementedException(); }
+    }
+
     public virtual double PunishmentFactor {
       get { return GetVariableInjector().GetVariable("PunishmentFactor").GetValue<DoubleData>().Data; }
@@ -46,65 +68,22 @@
 
     protected override IOperator CreateFunctionLibraryInjector() {
-      CombinedOperator op = new CombinedOperator();
-      op.Name = "FunctionLibraryInjector";
-      SequentialProcessor seq = new SequentialProcessor();     
-      seq.AddSubOperator(new FunctionLibraryInjector());
-      seq.AddSubOperator(new HL2TreeEvaluatorInjector());
-      op.OperatorGraph.AddOperator(seq);
-      op.OperatorGraph.InitialOperator = seq;
-      return op;
+      return DefaultStructureIdentificationAlgorithmOperators.CreateFunctionLibraryInjector();
     }
 
     protected override IOperator CreateProblemInjector() {
-      return new ProblemInjector();
+      return DefaultStructureIdentificationAlgorithmOperators.CreateProblemInjector();
     }
 
     protected override IOperator CreateInitialPopulationEvaluator() {
-      MeanSquaredErrorEvaluator eval = new MeanSquaredErrorEvaluator();
-      eval.Name = "Evaluator";
-      eval.GetVariableInfo("MSE").ActualName = "Quality";
-      eval.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
-      eval.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
-      return eval;
+      return DefaultStructureIdentificationAlgorithmOperators.CreateInitialPopulationEvaluator();
     }
 
     protected override IOperator CreateEvaluationOperator() {
-      return CreateInitialPopulationEvaluator();
+      return DefaultStructureIdentificationAlgorithmOperators.CreateEvaluator();
     }
 
 
     protected override IOperator CreateGenerationStepHook() {
-      CombinedOperator op = new CombinedOperator();
-      SequentialProcessor seq = new SequentialProcessor();
-      UniformSequentialSubScopesProcessor subScopesProc = new UniformSequentialSubScopesProcessor();
-      SequentialProcessor individualProc = new SequentialProcessor();
-      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
-      validationEvaluator.Name = "ValidationEvaluator";
-      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
-      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
-      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
-
-      individualProc.AddSubOperator(validationEvaluator);
-
-      BestSolutionStorer solutionStorer = new BestSolutionStorer();
-      solutionStorer.GetVariableInfo("BestSolution").ActualName = "BestValidationSolution";
-      solutionStorer.GetVariableInfo("Quality").ActualName = "ValidationQuality";
-
-      BestAverageWorstQualityCalculator validationQualityCalculator = new BestAverageWorstQualityCalculator();
-      validationQualityCalculator.Name = "BestAverageWorstValidationQualityCalculator";
-      validationQualityCalculator.GetVariableInfo("Quality").ActualName = "ValidationQuality";
-      validationQualityCalculator.GetVariableInfo("BestQuality").ActualName = "BestValidationQuality";
-      validationQualityCalculator.GetVariableInfo("AverageQuality").ActualName = "AverageValidationQuality";
-      validationQualityCalculator.GetVariableInfo("WorstQuality").ActualName = "WorstValidationQuality";
-
-      subScopesProc.AddSubOperator(individualProc);
-
-      seq.AddSubOperator(subScopesProc);
-      seq.AddSubOperator(solutionStorer);
-      seq.AddSubOperator(validationQualityCalculator);
-
-      op.OperatorGraph.AddOperator(seq);
-      op.OperatorGraph.InitialOperator = seq;
-      return op;
+      return DefaultStructureIdentificationAlgorithmOperators.CreateGenerationStepHook();
     }
 
Index: /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs
===================================================================
--- /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 2336)
+++ /branches/gp-algorithms-refactoring-#720/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 2337)
@@ -31,7 +31,30 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public class StandardGP : HeuristicLab.GP.Algorithms.StandardGP {
+  public class StandardGP : HeuristicLab.GP.Algorithms.StandardGP, IAlgorithm {
 
     public override string Name { get { return "StandardGP - StructureIdentification"; } }
+
+    public HeuristicLab.DataAnalysis.Dataset Dataset {
+      get {
+        throw new NotImplementedException();
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public int TargetVariable {
+      get {
+        throw new NotImplementedException();
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public IAnalyzerModel Model {
+      get { throw new NotImplementedException(); }
+    }
+
     public virtual double PunishmentFactor {
       get { return GetVariableInjector().GetVariable("PunishmentFactor").GetValue<DoubleData>().Data; }
@@ -46,65 +69,22 @@
 
     protected override IOperator CreateFunctionLibraryInjector() {
-      CombinedOperator op = new CombinedOperator();
-      op.Name = "FunctionLibraryInjector";
-      SequentialProcessor seq = new SequentialProcessor();
-      seq.AddSubOperator(new FunctionLibraryInjector());
-      seq.AddSubOperator(new HL2TreeEvaluatorInjector());
-      op.OperatorGraph.AddOperator(seq);
-      op.OperatorGraph.InitialOperator = seq;
-      return op;
+      return DefaultStructureIdentificationAlgorithmOperators.CreateFunctionLibraryInjector();
     }
 
     protected override IOperator CreateProblemInjector() {
-      return new ProblemInjector();
+      return DefaultStructureIdentificationAlgorithmOperators.CreateProblemInjector();
     }
 
     protected override IOperator CreateInitialPopulationEvaluator() {
-      MeanSquaredErrorEvaluator eval = new MeanSquaredErrorEvaluator();
-      eval.Name = "Evaluator";
-      eval.GetVariableInfo("MSE").ActualName = "Quality";
-      eval.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart";
-      eval.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd";
-      return eval;
+      return DefaultStructureIdentificationAlgorithmOperators.CreateInitialPopulationEvaluator();
     }
 
     protected override IOperator CreateEvaluationOperator() {
-      return CreateInitialPopulationEvaluator();
+      return DefaultStructureIdentificationAlgorithmOperators.CreateEvaluator();      
     }
 
 
     protected override IOperator CreateGenerationStepHook() {
-      CombinedOperator op = new CombinedOperator();
-      SequentialProcessor seq = new SequentialProcessor();
-      UniformSequentialSubScopesProcessor subScopesProc = new UniformSequentialSubScopesProcessor();
-      SequentialProcessor individualProc = new SequentialProcessor();
-      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
-      validationEvaluator.Name = "ValidationEvaluator";
-      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
-      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
-      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
-
-      individualProc.AddSubOperator(validationEvaluator);
-
-      BestSolutionStorer solutionStorer = new BestSolutionStorer();
-      solutionStorer.GetVariableInfo("BestSolution").ActualName = "BestValidationSolution";
-      solutionStorer.GetVariableInfo("Quality").ActualName = "ValidationQuality";
-
-      BestAverageWorstQualityCalculator validationQualityCalculator = new BestAverageWorstQualityCalculator();
-      validationQualityCalculator.Name = "BestAverageWorstValidationQualityCalculator";
-      validationQualityCalculator.GetVariableInfo("Quality").ActualName = "ValidationQuality";
-      validationQualityCalculator.GetVariableInfo("BestQuality").ActualName = "BestValidationQuality";
-      validationQualityCalculator.GetVariableInfo("AverageQuality").ActualName = "AverageValidationQuality";
-      validationQualityCalculator.GetVariableInfo("WorstQuality").ActualName = "WorstValidationQuality";
-
-      subScopesProc.AddSubOperator(individualProc);
-
-      seq.AddSubOperator(subScopesProc);
-      seq.AddSubOperator(solutionStorer);
-      seq.AddSubOperator(validationQualityCalculator);
-
-      op.OperatorGraph.AddOperator(seq);
-      op.OperatorGraph.InitialOperator = seq;
-      return op;
+      return DefaultStructureIdentificationAlgorithmOperators.CreateGenerationStepHook();
     }
 
