Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs	(revision 10819)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs	(revision 10820)
@@ -303,5 +303,6 @@
 
           smoothingToolStripMenuItem_Column.Enabled =
-            interpolationToolStripMenuItem_Column.Enabled = !(e.RowIndex == 0 || e.RowIndex == Content.Rows)
+            interpolationToolStripMenuItem_Column.Enabled = !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, 0])
+            && !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, Content.Rows - 1])
             && !Content.DataGridLogic.AreAllStringColumns(columnIndices);
 
@@ -423,9 +424,7 @@
       Content.ManipulationLogic.ReplaceIndicesByLinearInterpolationOfNeighbours(GetSelectedCells());
     }
-    private void ReplaceWithInterpolation_Selection_Click(object sender, EventArgs e) {
-      Content.ManipulationLogic.ReplaceIndicesByLinearInterpolationOfNeighbours(GetSelectedCells());
-    }
 
     private void ReplaceWithSmoothing_Selection_Click(object sender, EventArgs e) {
+      Content.ManipulationLogic.ReplaceIndicesBySmoothing(GetSelectedCells());
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationLogic.cs	(revision 10819)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationLogic.cs	(revision 10820)
@@ -109,4 +109,38 @@
           }
 
+          IList<Tuple<int, int>> startEndings = GetStartAndEndingsForInterpolation(column);
+          foreach (var tuple in startEndings) {
+            Interpolate(column, tuple.Item1, tuple.Item2);
+          }
+        }
+      });
+    }
+
+    private List<Tuple<int, int>> GetStartAndEndingsForInterpolation(KeyValuePair<int, IList<int>> column) {
+      List<Tuple<int, int>> startEndings = new List<Tuple<int, int>>();
+      var rowIndices = column.Value;
+      rowIndices = rowIndices.OrderBy(x => x).ToList();
+      var count = rowIndices.Count;
+      int start = int.MinValue;
+      for (int i = 0; i < count; ++i) {
+        if (start == int.MinValue) {
+          start = indexOfPrevPresentValue(column.Key, rowIndices[i]);
+        }
+        if (i + 1 == count || (i + 1 < count && rowIndices[i + 1] - rowIndices[i] > 1)) {
+          int next = indexOfNextPresentValue(column.Key, rowIndices[i]);
+          if (start > 0 && next < preprocessingData.Rows) {
+            startEndings.Add(new Tuple<int, int>(start, next));
+          }
+          start = int.MinValue;
+        }
+      }
+      return startEndings;
+    }
+
+    public void ReplaceIndicesBySmoothing(IDictionary<int, IList<int>> cells) {
+      preprocessingData.InTransaction(() => {
+        foreach (var column in cells) {
+          int countValues = preprocessingData.Rows;
+
           foreach (int index in column.Value) {
             // dont replace first or last values
@@ -116,33 +150,37 @@
 
               // no neighbours found
-              if (prevIndex < 0 && nextIndex >= countValues) {
+              if (prevIndex < 0 || nextIndex >= countValues) {
                 continue;
               }
 
-              int valuesToInterpolate = nextIndex - prevIndex;
-
-              if (preprocessingData.IsType<double>(column.Key)) {
-                double prev = preprocessingData.GetCell<double>(column.Key, prevIndex);
-                double next = preprocessingData.GetCell<double>(column.Key, nextIndex);
-                double interpolationStep = (next - prev) / valuesToInterpolate;
-
-                for (int i = prevIndex; i < nextIndex; ++i) {
-                  double interpolated = prev + (interpolationStep * (i - prevIndex));
-                  preprocessingData.SetCell<double>(column.Key, i, interpolated);
-                }
-              } else if (preprocessingData.IsType<DateTime>(column.Key)) {
-                DateTime prev = preprocessingData.GetCell<DateTime>(column.Key, prevIndex);
-                DateTime next = preprocessingData.GetCell<DateTime>(column.Key, nextIndex);
-                double interpolationStep = (next - prev).TotalSeconds / valuesToInterpolate;
-
-                for (int i = prevIndex; i < nextIndex; ++i) {
-                  DateTime interpolated = prev.AddSeconds(interpolationStep * (i - prevIndex));
-                  preprocessingData.SetCell<DateTime>(column.Key, i, interpolated);
-                }
-              }
+              Interpolate(column, prevIndex, nextIndex);
             }
           }
         }
       });
+    }
+
+    private void Interpolate(KeyValuePair<int, IList<int>> column, int prevIndex, int nextIndex) {
+      int valuesToInterpolate = nextIndex - prevIndex;
+
+      if (preprocessingData.IsType<double>(column.Key)) {
+        double prev = preprocessingData.GetCell<double>(column.Key, prevIndex);
+        double next = preprocessingData.GetCell<double>(column.Key, nextIndex);
+        double interpolationStep = (next - prev) / valuesToInterpolate;
+
+        for (int i = prevIndex; i < nextIndex; ++i) {
+          double interpolated = prev + (interpolationStep * (i - prevIndex));
+          preprocessingData.SetCell<double>(column.Key, i, interpolated);
+        }
+      } else if (preprocessingData.IsType<DateTime>(column.Key)) {
+        DateTime prev = preprocessingData.GetCell<DateTime>(column.Key, prevIndex);
+        DateTime next = preprocessingData.GetCell<DateTime>(column.Key, nextIndex);
+        double interpolationStep = (next - prev).TotalSeconds / valuesToInterpolate;
+
+        for (int i = prevIndex; i < nextIndex; ++i) {
+          DateTime interpolated = prev.AddSeconds(interpolationStep * (i - prevIndex));
+          preprocessingData.SetCell<DateTime>(column.Key, i, interpolated);
+        }
+      }
     }
 
@@ -232,20 +270,12 @@
     }
 
-    public void ShuffleToIndices(IList<System.Tuple<int, int>> indices)
-    {
-      preprocessingData.InTransaction(() =>
-      {
-        for (int i = 0; i < preprocessingData.Columns; ++i)
-        {
-          if (preprocessingData.IsType<double>(i))
-          {
+    public void ShuffleToIndices(IList<System.Tuple<int, int>> indices) {
+      preprocessingData.InTransaction(() => {
+        for (int i = 0; i < preprocessingData.Columns; ++i) {
+          if (preprocessingData.IsType<double>(i)) {
             ShuffleToIndices<double>(i, indices);
-          }
-          else if (preprocessingData.IsType<string>(i))
-          {
+          } else if (preprocessingData.IsType<string>(i)) {
             ShuffleToIndices<string>(i, indices);
-          }
-          else if (preprocessingData.IsType<DateTime>(i))
-          {
+          } else if (preprocessingData.IsType<DateTime>(i)) {
             ShuffleToIndices<DateTime>(i, indices);
           }
@@ -268,9 +298,7 @@
     }
 
-    private void ShuffleToIndices<T>(int columnIndex, IList<Tuple<int, int>> indices)
-    {
+    private void ShuffleToIndices<T>(int columnIndex, IList<Tuple<int, int>> indices) {
       // process all columns equally
-      foreach (Tuple<int, int> index in indices)
-      {
+      foreach (Tuple<int, int> index in indices) {
         int originalIndex = index.Item1;
         int replaceIndex = index.Item2;
@@ -297,11 +325,9 @@
     public List<int> RowsWithMissingValuesGreater(double percent) {
 
-      List<int> rows= new List<int>();
-
-      for (int i = 0; i < preprocessingData.Rows; ++i)
-      {
+      List<int> rows = new List<int>();
+
+      for (int i = 0; i < preprocessingData.Rows; ++i) {
         int missingCount = statisticsLogic.GetRowMissingValueCount(i);
-        if (100f / preprocessingData.Columns * missingCount > percent)
-        {
+        if (100f / preprocessingData.Columns * missingCount > percent) {
           rows.Add(i);
         }
@@ -328,9 +354,7 @@
       List<int> columns = new List<int>();
       for (int i = 0; i < preprocessingData.Columns; ++i) {
-        if (preprocessingData.IsType<double>(i) || preprocessingData.IsType<DateTime>(i))
-        {
+        if (preprocessingData.IsType<double>(i) || preprocessingData.IsType<DateTime>(i)) {
           double columnVariance = statisticsLogic.GetVariance(i);
-          if (columnVariance < variance)
-          {
+          if (columnVariance < variance) {
             columns.Add(i);
           }
@@ -355,8 +379,6 @@
       rows.Sort();
       rows.Reverse();
-      preprocessingData.InTransaction(() =>
-      {
-        foreach (int row in rows)
-        {
+      preprocessingData.InTransaction(() => {
+        foreach (int row in rows) {
           preprocessingData.DeleteRow(row);
         }
@@ -367,8 +389,6 @@
       columns.Sort();
       columns.Reverse();
-      preprocessingData.InTransaction(() =>
-      {
-        foreach (int column in columns)
-        {
+      preprocessingData.InTransaction(() => {
+        foreach (int column in columns) {
           preprocessingData.DeleteColumn(column);
         }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IManipulationLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IManipulationLogic.cs	(revision 10819)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IManipulationLogic.cs	(revision 10820)
@@ -29,8 +29,9 @@
     void ShuffleToIndices(IList<System.Tuple<int, int>> indices);
     void ReplaceIndicesByAverageValue(IDictionary<int, IList<int>> cells, bool considerSelection = false);
-    void ReplaceIndicesByLinearInterpolationOfNeighbours(IDictionary<int, IList<int>> cells);
     void ReplaceIndicesByMedianValue(IDictionary<int, IList<int>> cells, bool considerSelection = false);
     void ReplaceIndicesByMostCommonValue(IDictionary<int, IList<int>> cells, bool considerSelection = false);
     void ReplaceIndicesByRandomValue(IDictionary<int, IList<int>> cells, bool considerSelection = false);
+    void ReplaceIndicesByLinearInterpolationOfNeighbours(IDictionary<int, IList<int>> cells);
+    void ReplaceIndicesBySmoothing(IDictionary<int, IList<int>> cells);
     void ReplaceIndicesByValue(IDictionary<int, IList<int>> cells, string value);
     void ReplaceIndicesByValue<T>(int columnIndex, IEnumerable<int> rowIndices, T value);
@@ -45,4 +46,6 @@
 
     event DataPreprocessingChangedEventHandler Changed;
+
+
   }
 }
