Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.Tests/UnitTest.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.Tests/UnitTest.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.Tests/UnitTest.cs	(revision 9099)
@@ -2,4 +2,5 @@
 using System.Linq;
 using System.Threading;
+using HeuristicLab.Algorithms.DataAnalysis;
 using HeuristicLab.Algorithms.GeneticAlgorithm;
 using HeuristicLab.Problems.DataAnalysis;
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessPolyTen.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessPolyTen.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessPolyTen.cs	(revision 9099)
@@ -129,7 +129,8 @@
       covarianceFunction.Terms.Add(t5);
 
-      covarianceFunction.SetParameter(hyp.ToArray());
+      var cov = covarianceFunction.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
 
-      var target = Util.SampleGaussianProcess(mt, covarianceFunction, data);
+
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso.cs	(revision 9099)
@@ -56,8 +56,11 @@
       covarianceFunction.Terms.Add(new CovarianceSquaredExponentialIso());
       covarianceFunction.Terms.Add(new CovarianceNoise());
-      covarianceFunction.SetParameter(new double[] { Math.Log(0.1), Math.Log(Math.Sqrt(1)), Math.Log(Math.Sqrt(0.01)) });
+      var cov =
+        covarianceFunction.GetParameterizedCovarianceFunction(
+          new double[] { Math.Log(0.1), Math.Log(Math.Sqrt(1)), Math.Log(Math.Sqrt(0.01)) },
+          Enumerable.Range(0, AllowedInputVariables.Count()));
 
       var mt = new MersenneTwister(31415);
-      var target = Util.SampleGaussianProcess(mt, covarianceFunction, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso1.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso1.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso1.cs	(revision 9099)
@@ -65,8 +65,8 @@
       covFun.Terms.Add(m1);
       covFun.Terms.Add(new CovarianceNoise());
-      covFun.SetParameter(hyp.ToArray());
 
+      var cov = covFun.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
       var mt = new MersenneTwister();
-      var target = Util.SampleGaussianProcess(mt, covFun, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso2.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso2.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso2.cs	(revision 9099)
@@ -70,8 +70,8 @@
       covFun.Terms.Add(m2);
       covFun.Terms.Add(new CovarianceNoise());
-      covFun.SetParameter(hyp.ToArray());
+      var cov = covFun.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
 
       var mt = new MersenneTwister();
-      var target = Util.SampleGaussianProcess(mt, covFun, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso3.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso3.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso3.cs	(revision 9099)
@@ -75,8 +75,8 @@
       covFun.Terms.Add(m3);
       covFun.Terms.Add(new CovarianceNoise());
-      covFun.SetParameter(hyp.ToArray());
+      var cov = covFun.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
 
       var mt = new MersenneTwister();
-      var target = Util.SampleGaussianProcess(mt, covFun, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso4.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso4.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso4.cs	(revision 9099)
@@ -65,8 +65,8 @@
       covFun.Terms.Add(m1);
       covFun.Terms.Add(new CovarianceNoise());
-      covFun.SetParameter(hyp.ToArray());
 
+      var cov = covFun.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
       var mt = new MersenneTwister();
-      var target = Util.SampleGaussianProcess(mt, covFun, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso5.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso5.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso5.cs	(revision 9099)
@@ -69,8 +69,8 @@
       covFun.Terms.Add(m2);
       covFun.Terms.Add(new CovarianceNoise());
-      covFun.SetParameter(hyp.ToArray());
+      var cov = covFun.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
 
       var mt = new MersenneTwister();
-      var target = Util.SampleGaussianProcess(mt, covFun, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso6.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso6.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIso6.cs	(revision 9099)
@@ -80,8 +80,9 @@
       covFun.Terms.Add(m4);
       covFun.Terms.Add(new CovarianceNoise());
-      covFun.SetParameter(hyp.ToArray());
+      var cov = covFun.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
+
 
       var mt = new MersenneTwister();
-      var target = Util.SampleGaussianProcess(mt, covFun, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIsoDependentNoise.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIsoDependentNoise.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/GaussianProcessSEIsoDependentNoise.cs	(revision 9099)
@@ -67,8 +67,8 @@
           Math.Log(Math.Sqrt(0.01)) // noise
         };
-      covarianceFunction.SetParameter(hyp);
+      var cov = covarianceFunction.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, AllowedInputVariables.Count()));
 
       var mt = new MersenneTwister(31415);
-      var target = Util.SampleGaussianProcess(mt, covarianceFunction, data);
+      var target = Util.SampleGaussianProcess(mt, cov, data);
       data.Add(target);
 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Instances.DataAnalysis.GaussianProcessRegression-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Instances.DataAnalysis.GaussianProcessRegression-3.3.csproj	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Instances.DataAnalysis.GaussianProcessRegression-3.3.csproj	(revision 9099)
@@ -213,5 +213,11 @@
   </PropertyGroup>
   <PropertyGroup>
-    <PreBuildEvent />
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
   </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Util.cs
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Util.cs	(revision 9098)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.Instances.DataAnalysis.GaussianProcessRegression/Util.cs	(revision 9099)
@@ -32,5 +32,5 @@
 
 
-    public static List<double> SampleGaussianProcess(IRandom random, ICovarianceFunction covFunction, List<List<double>> data) {
+    public static List<double> SampleGaussianProcess(IRandom random, ParameterizedCovarianceFunction covFunction, List<List<double>> data) {
 
       double[,] x = new double[data[0].Count, data.Count];
@@ -41,5 +41,5 @@
       for (int i = 0; i < K.GetLength(0); i++)
         for (int j = i; j < K.GetLength(1); j++)
-          K[i, j] = covFunction.GetCovariance(x, i, j, null);
+          K[i, j] = covFunction.Covariance(x, i, j);
 
       var normalRand = new NormalDistributedRandom(random, 0, 1);
Index: /branches/HeuristicLab.Problems.GaussianProcessTuning/PreBuildEvent.cmd
===================================================================
--- /branches/HeuristicLab.Problems.GaussianProcessTuning/PreBuildEvent.cmd	(revision 9099)
+++ /branches/HeuristicLab.Problems.GaussianProcessTuning/PreBuildEvent.cmd	(revision 9099)
@@ -0,0 +1,2 @@
+IF EXIST "%ProjectDir%\Properties\AssemblyInfo.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
+IF EXIST "%ProjectDir%\Plugin.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
