Index: branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalyzer.cs
===================================================================
--- branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalyzer.cs	(revision 15689)
+++ branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalyzer.cs	(revision 16096)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -27,6 +28,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Linq;
-using System;
 
 namespace HeuristicLab.Analysis.FitnessLandscape {
@@ -125,32 +124,32 @@
       var ic = new DoubleValue(analysis.InformationContent.FirstOrDefault());
       InformationContentParameter.ActualValue = ic;
-      AddOrUpdateResult(results, InformationContentParameter.Name, ic);
+      results.AddOrUpdateResult(InformationContentParameter.Name, ic);
       var pic = new DoubleValue(analysis.PartialInformationContent.FirstOrDefault());
       PartialInformationContentParameter.ActualValue = pic;
-      AddOrUpdateResult(results, PartialInformationContentParameter.Name, pic);
+      results.AddOrUpdateResult(PartialInformationContentParameter.Name, pic);
       var dbi = new DoubleValue(analysis.DensityBasinInformation.FirstOrDefault());
       DensityBasinInformationParameter.ActualValue = dbi;
-      AddOrUpdateResult(results, DensityBasinInformationParameter.Name, dbi);
+      results.AddOrUpdateResult(DensityBasinInformationParameter.Name, dbi);
       var @is = new DoubleValue(analysis.InformationStability);
       InformationStabilityParameter.ActualValue = @is;
-      AddOrUpdateResult(results, InformationStabilityParameter.Name, @is);
+      results.AddOrUpdateResult(InformationStabilityParameter.Name, @is);
       var regularity = new DoubleValue(1.0 * analysis.Regularity / qualities.Count);
       RegularityParameter.ActualValue = regularity;
-      AddOrUpdateResult(results, RegularityParameter.Name, regularity);
+      results.AddOrUpdateResult(RegularityParameter.Name, regularity);
       var diversity = new DoubleValue(1.0 * analysis.Diversity / qualities.Count);
       DiversityParameter.ActualValue = diversity;
-      AddOrUpdateResult(results, DiversityParameter.Name, diversity);
+      results.AddOrUpdateResult(DiversityParameter.Name, diversity);
       var totalEntropy = new DoubleValue(analysis.TotalEntropy.FirstOrDefault());
       TotalEntropyParameter.ActualValue = totalEntropy;
-      AddOrUpdateResult(results, TotalEntropyParameter.Name, totalEntropy);
+      results.AddOrUpdateResult(TotalEntropyParameter.Name, totalEntropy);
       var peakIc = new DoubleValue(analysis.PeakInformationContent.Value);
       PeakInformationContentParameter.ActualValue = peakIc;
-      AddOrUpdateResult(results, PeakInformationContentParameter.Name, peakIc);
+      results.AddOrUpdateResult(PeakInformationContentParameter.Name, peakIc);
       var peakDbi = new DoubleValue(analysis.PeakDensityBasinInformation.Value);
       PeakDensityBasinInformationParameter.ActualValue = peakDbi;
-      AddOrUpdateResult(results, PeakDensityBasinInformationParameter.Name, peakDbi);
+      results.AddOrUpdateResult(PeakDensityBasinInformationParameter.Name, peakDbi);
 
       var itable = GetInformationTable(analysis);
-      AddOrUpdateResult(results, InformationAnalysisParameter.Name, itable);
+      results.AddOrUpdateResult(InformationAnalysisParameter.Name, itable);
       return base.Apply();
     }
@@ -176,11 +175,4 @@
       return dt;
     }
-
-    private static void AddOrUpdateResult(ResultCollection results, string name, IItem item, bool clone = false) {
-      IResult r;
-      if (!results.TryGetValue(name, out r)) {
-        results.Add(new Result(name, clone ? (IItem)item.Clone() : item));
-      } else r.Value = clone ? (IItem)item.Clone() : item;
-    }
   }
 }
Index: branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/RuggednessAnalyzer.cs
===================================================================
--- branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/RuggednessAnalyzer.cs	(revision 15689)
+++ branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/RuggednessAnalyzer.cs	(revision 16096)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -27,8 +28,7 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Linq;
 
 namespace HeuristicLab.Analysis.FitnessLandscape {
-  [Item("Ruggedness Analyzer", "Analyzes autocorrelation for one mutation step and correlation length.")]
+  [Item("Ruggedness Analyzer", "Analyzes autocorrelation for one mutation step and correlation length. Correlation length is calculated according to the statistical correlation length defined by Hordijk, W., 1996. A measure of landscapes. Evolutionary computation, 4(4), pp.335-360.")]
   [StorableClass]
   public class RuggednessAnalyzer : SingleSuccessorOperator, IQualityTrailAnalyzer {
@@ -50,4 +50,7 @@
       get { return (LookupParameter<IntValue>)Parameters["CorrelationLength"]; }
     }
+    public ValueLookupParameter<DoubleValue> LimitParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["Limit"]; }
+    }
     #endregion
 
@@ -60,4 +63,5 @@
       Parameters.Add(new LookupParameter<DoubleValue>("AutoCorrelation1", "Autocorrelation for one mutation step."));
       Parameters.Add(new LookupParameter<IntValue>("CorrelationLength", "The correlation length."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("Limit", "The limit for the statistical correlation length, if left empty 2 / sqrt(n), where n = length of walk will be used, as defined by Hordijk 1996."));
     }
 
@@ -70,20 +74,14 @@
       if (qualityTrail == null || qualityTrail.Rows.Count <= 0) return base.Apply();
       var results = ResultsParameter.ActualValue;
+      var limit = LimitParameter.ActualValue?.Value;
       double[] autocorrelationValues;
-      var correlationLength = RuggednessCalculator.CalculateCorrelationLength(qualityTrail.Rows.First().Values.ToArray(), out autocorrelationValues);
+      var correlationLength = RuggednessCalculator.CalculateCorrelationLength(qualityTrail.Rows.First().Values.ToArray(), out autocorrelationValues, limit);
       var cl = new IntValue(correlationLength);
       CorrelationLengthParameter.ActualValue = cl;
-      AddOrUpdateResult(results, CorrelationLengthParameter.Name, cl);
+      results.AddOrUpdateResult(CorrelationLengthParameter.Name, cl);
       var ac1 = new DoubleValue(autocorrelationValues.Length > 1 ? autocorrelationValues[1] : 0.0);
       AutoCorrelation1Parameter.ActualValue = ac1;
-      AddOrUpdateResult(results, AutoCorrelation1Parameter.Name, ac1);
+      results.AddOrUpdateResult(AutoCorrelation1Parameter.Name, ac1);
       return base.Apply();
-    }
-
-    private static void AddOrUpdateResult(ResultCollection results, string name, IItem item, bool clone = false) {
-      IResult r;
-      if (!results.TryGetValue(name, out r)) {
-        results.Add(new Result(name, clone ? (IItem)item.Clone() : item));
-      } else r.Value = clone ? (IItem)item.Clone() : item;
     }
   }
Index: branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/RuggednessCalculator.cs
===================================================================
--- branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/RuggednessCalculator.cs	(revision 15689)
+++ branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/RuggednessCalculator.cs	(revision 16096)
@@ -20,54 +20,18 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace HeuristicLab.Analysis.FitnessLandscape {
-  [Item("Ruggedness Calculator", "Calculates ruggedness descriptors froma given quality trail.")]
-  [StorableClass]
-  public class RuggednessCalculator : SingleSuccessorOperator {
-
-    #region Parameters
-    public LookupParameter<DataTable> QualityTrailParameter {
-      get { return (LookupParameter<DataTable>)Parameters["QualityTrail"]; }
-    }
-    public LookupParameter<IntValue> CorrelationLengthParameter {
-      get { return (LookupParameter<IntValue>)Parameters["CorrelationLength"]; }
-    }
-    public LookupParameter<DoubleArray> AutoCorrelationParameter {
-      get { return (LookupParameter<DoubleArray>)Parameters["AutoCorrelation"]; }
-    }
-    #endregion
-
-    #region Constructors & Cloning
-    [StorableConstructor]
-    protected RuggednessCalculator(bool deserializing) : base(deserializing) { }
-    protected RuggednessCalculator(RuggednessCalculator original, Cloner cloner) : base(original, cloner) { }
-    public RuggednessCalculator() {
-      Parameters.Add(new LookupParameter<DataTable>("QualityTrail", "Historical values of walk qualities"));
-      Parameters.Add(new LookupParameter<IntValue>("CorrelationLength", "Average maximum distances between correlated quality values."));
-      Parameters.Add(new LookupParameter<DoubleArray>("AutoCorrelation", "AutoCorrelation"));
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new RuggednessCalculator(this, cloner);
-    }
-    #endregion
-
-    public override IOperation Apply() {
-      double[] qualities = QualityTrailParameter.ActualValue.Rows.First().Values.ToArray();
-      double[] autocorrelation;
-      CorrelationLengthParameter.ActualValue = new IntValue(CalculateCorrelationLength(qualities, out autocorrelation));
-      AutoCorrelationParameter.ActualValue = new DoubleArray(autocorrelation);
-      return base.Apply();
-    }
-
-    public static int CalculateCorrelationLength(double[] qualities, out double[] acf) {
+  public static class RuggednessCalculator {
+    /// <summary>
+    /// Calculates statistical correlation length as defined by Hordijk, W., 1996. A measure of landscapes. Evolutionary computation, 4(4), pp.335-360.
+    /// </summary>
+    /// <param name="qualities">The quality trail observed.</param>
+    /// <param name="acf">The autocorrelation values for each step s, including 0 => acf[0] = 1.</param>
+    /// <param name="limit">The statistical limit, correlation length will be the last step before acf falls within this limit. If omitted it is calculated as 2 / sqrt(qualities.Length).</param>
+    /// <returns>The statistical correlation length</returns>
+    public static int CalculateCorrelationLength(double[] qualities, out double[] acf, double? limit = null) {
+      if (!limit.HasValue) limit = 2.0 / Math.Sqrt(qualities.Length);
       double[] correlations = new double[qualities.Length];
       alglib.corr.corrr1dcircular(qualities, qualities.Length, qualities, qualities.Length, ref correlations);
@@ -86,13 +50,9 @@
           value = 1;
         autocorrelation.Add(value);
-        if (value < 0 && correlationLength < 0) correlationLength = counter;
+        if (Math.Abs(value) < limit && correlationLength < 0) correlationLength = counter;
       }
       acf = autocorrelation.ToArray();
       return correlationLength - 1;
     }
-
-    public static bool AnyGreaterOne(double[] values) {
-      return values.Any(d => d > 1);
-    }
   }
 }
Index: branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/UpDownWalkAnalyzer.cs
===================================================================
--- branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/UpDownWalkAnalyzer.cs	(revision 15689)
+++ branches/2457_ExpertSystem/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/UpDownWalkAnalyzer.cs	(revision 16096)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -27,5 +28,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Linq;
 
 namespace HeuristicLab.Analysis.FitnessLandscape {
@@ -123,11 +123,11 @@
               var uv = new DoubleValue(topVals.Variance());
               UpperVarianceParameter.ActualValue = uv;
-              AddOrUpdateResult(results, UpperVarianceParameter.Name, uv);
+              results.AddOrUpdateResult(UpperVarianceParameter.Name, uv);
               var ul = new DoubleValue(topLengths.Average());
               UpWalkLengthParameter.ActualValue = ul;
-              AddOrUpdateResult(results, UpWalkLengthParameter.Name, ul);
+              results.AddOrUpdateResult(UpWalkLengthParameter.Name, ul);
               var ulv = new DoubleValue(topLengths.Variance());
               UpWalkLenVarParameter.ActualValue = ulv;
-              AddOrUpdateResult(results, UpWalkLenVarParameter.Name, ulv);
+              results.AddOrUpdateResult(UpWalkLenVarParameter.Name, ulv);
             }
             if (bottoms.Count > 0) {
@@ -136,11 +136,11 @@
               var lv = new DoubleValue(bottomVals.Variance());
               LowerVarianceParameter.ActualValue = lv;
-              AddOrUpdateResult(results, LowerVarianceParameter.Name, lv);
+              results.AddOrUpdateResult(LowerVarianceParameter.Name, lv);
               var dl = new DoubleValue(bottomLengths.Average());
               DownWalkLengthParameter.ActualValue = dl;
-              AddOrUpdateResult(results, DownWalkLengthParameter.Name, dl);
+              results.AddOrUpdateResult(DownWalkLengthParameter.Name, dl);
               var dlv = new DoubleValue(bottomLengths.Variance());
               DownWalkLenVarParameter.ActualValue = dlv;
-              AddOrUpdateResult(results, DownWalkLenVarParameter.Name, dlv);
+              results.AddOrUpdateResult(DownWalkLenVarParameter.Name, dlv);
             }
           }
@@ -149,11 +149,4 @@
       return base.Apply();
     }
-
-    private static void AddOrUpdateResult(ResultCollection results, string name, IItem item, bool clone = false) {
-      IResult r;
-      if (!results.TryGetValue(name, out r)) {
-        results.Add(new Result(name, clone ? (IItem)item.Clone() : item));
-      } else r.Value = clone ? (IItem)item.Clone() : item;
-    }
   }
 }
