Index: branches/2966_interval_calculation/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/Intervalnterpreter.cs
===================================================================
--- branches/2966_interval_calculation/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/Intervalnterpreter.cs	(revision 16326)
+++ branches/2966_interval_calculation/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/Intervalnterpreter.cs	(revision 16328)
@@ -10,8 +10,9 @@
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 
-namespace HeuristicLab.Algorithms.DataAnalysis.KnowledgeIntegration.Interpreter {
+namespace HeuristicLab.Algorithms.DataAnalysis.Symbolic {
   [StorableClass]
   [Item("SymbolicDataAnalysisIntervalArithmeticInterpreter", "Interpreter for interval arithmetic within symbolic regression.")]
-  public class IntervalInterpreter : ParameterizedNamedItem{
+  public sealed class IntervalInterpreter : ParameterizedNamedItem, IStatefulItem {
+
     private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
     public IFixedValueParameter<IntValue> EvaluatedSolutionsParameter {
@@ -24,10 +25,6 @@
     }
 
-    public void ClearState() { }
-
-    protected IntervalInterpreter(bool deserializing) : base(deserializing) { }
-
-    protected IntervalInterpreter(IntervalInterpreter original,
-        Cloner cloner)
+    private IntervalInterpreter(bool deserializing) : base(deserializing) { }
+    private IntervalInterpreter(IntervalInterpreter original, Cloner cloner)
         : base(original, cloner) { }
 
@@ -39,12 +36,46 @@
     }
 
+    #region IStatefulItem Members
+    public void InitializeState() {
+      EvaluatedSolutions = 0;
+    }
+    public void ClearState() { }
+    #endregion
+
+
+    public Interval GetSymbolicExressionTreeIntervals(ISymbolicExpressionTree tree, IEnumerable<int> rows, out Dictionary<ISymbolicExpressionTreeNode, Interval> intervals) {
+      intervals = new Dictionary<ISymbolicExpressionTreeNode, Interval>();
+      var state = PrepareInterpreterState(tree, rows);
+      var x = Evaluate(state, intervals);
+
+      return x;
+    }
+
+    public Interval GetSymbolicExressionTreeIntervals(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows,
+      Dictionary<string, Interval> customIntervals, out Dictionary<ISymbolicExpressionTreeNode, Interval> intervals) {
+      intervals = new Dictionary<ISymbolicExpressionTreeNode, Interval>();
+      var state = PrepareInterpreterState(tree, rows, dataset, customIntervals);
+      var x = Evaluate(state, intervals);
+
+      return x;
+    }
+
+    public Interval GetSymbolicExressionTreeIntervals(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows,
+      out Dictionary<ISymbolicExpressionTreeNode, Interval> intervals) {
+      intervals = new Dictionary<ISymbolicExpressionTreeNode, Interval>();
+      var state = PrepareInterpreterState(tree, rows, dataset);
+      var x = Evaluate(state, intervals);
+
+      return x;
+    }
+
     private readonly object syncRoot = new object();
 
-    private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, 
+    private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree,
       IEnumerable<int> rows, IDataset dataset = null, Dictionary<string, Interval> customIntervals = null) {
       Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode);
       int necessaryArgStackSize = 0;
-      
-      foreach(Instruction instr in code) {
+
+      foreach (Instruction instr in code) {
         if (instr.opCode == OpCodes.Variable) {
           var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
@@ -54,5 +85,6 @@
             if (customIntervals.ContainsKey(variableTreeNode.VariableName)) {
               instr.data = customIntervals[variableTreeNode.VariableName];
-            } else {
+            }
+            else {
               foreach (var rowEnum in rows) {
                 values.Add(dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName)[rowEnum]);
@@ -60,14 +92,17 @@
               instr.data = new Interval(values.Min(), values.Max());
             }
-          } else if (dataset != null) {
-             foreach (var rowEnum in rows) {
+          }
+          else if (dataset != null) {
+            foreach (var rowEnum in rows) {
               values.Add(dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName)[rowEnum]);
             }
             instr.data = new Interval(values.Min(), values.Max());
-          } else if (customIntervals != null) {
-            if (customIntervals.ContainsKey(variableTreeNode.VariableName)) { 
+          }
+          else if (customIntervals != null) {
+            if (customIntervals.ContainsKey(variableTreeNode.VariableName)) {
               instr.data = customIntervals[variableTreeNode.VariableName];
             }
-          } else {
+          }
+          else {
             throw new Exception("No valid input for variables!");
           }
@@ -182,34 +217,4 @@
       }
     }
-
-    public void InitializeState() {
-      EvaluatedSolutions = 0;
-    }
-
-    public Interval GetSymbolicExressionTreeIntervals(ISymbolicExpressionTree tree, IEnumerable<int> rows, out Dictionary<ISymbolicExpressionTreeNode, Interval> intervals) {
-      intervals = new Dictionary<ISymbolicExpressionTreeNode, Interval>();
-      var state = PrepareInterpreterState(tree, rows);
-      var x = Evaluate(state, intervals);
-
-      return x;
-    }
-
-    public Interval GetSymbolicExressionTreeIntervals(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows,
-      Dictionary<string, Interval> customIntervals, out Dictionary<ISymbolicExpressionTreeNode, Interval> intervals) {
-      intervals = new Dictionary<ISymbolicExpressionTreeNode, Interval>();
-      var state = PrepareInterpreterState(tree, rows, dataset, customIntervals);
-      var x = Evaluate(state, intervals);
-
-      return x;
-    }
-
-    public Interval GetSymbolicExressionTreeIntervals(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows, 
-      out Dictionary<ISymbolicExpressionTreeNode, Interval> intervals) {
-      intervals = new Dictionary<ISymbolicExpressionTreeNode, Interval>();
-      var state = PrepareInterpreterState(tree, rows, dataset);
-      var x = Evaluate(state, intervals);
-      
-      return x;
-    }
   }
 }
