Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 17399)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 17400)
@@ -538,5 +538,5 @@
         case OpCodes.VectorAvg: {
             DoubleVector v = VectorEvaluate(dataset, ref row, state);
-            return v.Average();
+            return v.Mean();
           }
 
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Vectors/DoubleVector.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Vectors/DoubleVector.cs	(revision 17399)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Vectors/DoubleVector.cs	(revision 17400)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Windows.Markup;
 using HEAL.Attic;
 
@@ -55,4 +54,8 @@
     }
 
+    public double DotProduct(DoubleVector other) {
+      return (this * other).Sum();
+    }
+
     public static DoubleVector operator +(DoubleVector lhs, double rhs) {
       return new DoubleVector(lhs.Select(l => l + rhs));
@@ -68,10 +71,31 @@
     }
 
+    public static DoubleVector operator +(double lhs, DoubleVector rhs) {
+      return new DoubleVector(rhs.Select(r => lhs + r));
+    }
+    public static DoubleVector operator -(double lhs, DoubleVector rhs) {
+      return new DoubleVector(rhs.Select(r => lhs - r));
+    }
+    public static DoubleVector operator *(double lhs, DoubleVector rhs) {
+      return new DoubleVector(rhs.Select(r => lhs * r));
+    }
+    public static DoubleVector operator /(double lhs, DoubleVector rhs) {
+      return new DoubleVector(rhs.Select(r => lhs / r));
+    }
+
     public double Sum() {
       return values.Sum();
     }
 
-    public double Average() {
+    public double Mean() {
       return values.Average();
+    }
+
+    public DoubleVector CumulativeMean() {
+      return new DoubleVector(
+        Enumerable.Range(0, this.Count)
+          .Select(this.Take)
+          .Select(numbers => numbers.Average())
+      );
     }
   }
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark1.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark1.cs	(revision 17400)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark1.cs	(revision 17400)
@@ -0,0 +1,61 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis {
+  public class AzzaliBenchmark1 : ArtificialRegressionDataDescriptor {
+    public override string Name { get { return "Azzali Benchmark1 B1 = (X4 + mean(X3)) - ((X3 · X4) - X2)  ( · = dot product)"; } }
+    public override string Description { get { return "I. Azzali, L. Vanneschi, S. Silva, I. Bakurov, and M. Giacobini, “A Vectorial Approach to Genetic Programming,” EuroGP, pp. 213–227, 2019."; } }
+
+    protected override string TargetVariable { get { return "B1"; } }
+    protected override string[] VariableNames { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override string[] AllowedInputVariables { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override int TrainingPartitionStart { get { return 0; } }
+    protected override int TrainingPartitionEnd { get { return 70; } }
+    protected override int TestPartitionStart { get { return 70; } }
+    protected override int TestPartitionEnd { get { return 100; } }
+
+    public int Seed { get; private set; }
+
+    public AzzaliBenchmark1()
+      : this((int)DateTime.Now.Ticks) { }
+    public AzzaliBenchmark1(int seed)
+      : base() {
+      Seed = seed;
+    }
+
+
+    protected override List<List<double>> GenerateValues() { return null; }
+    protected override List<IList> GenerateValuesExtended() {
+      var rand = new MersenneTwister((uint)Seed);
+
+      var x1Column = new List<double>(100);
+      var x2Column = new List<double>(100);
+      var x3Column = new List<DoubleVector>(100);
+      var x4Column = new List<DoubleVector>(100);
+      var b1Column = new List<DoubleVector>(100);
+
+      for (int i = 0; i < 100; i++) {
+        var x1 = rand.NextDouble(-10, +10);
+        var x2 = rand.NextDouble(-10, +10);
+        var x3 = rand.NextDoubleVector(10, 40, 10);
+        var x4 = rand.NextDoubleVector(-5, +5, 10);
+
+        var b1 = (x4 + x3.Mean()) - (x3.DotProduct(x4) - x2);
+
+        x1Column.Add(x1);
+        x2Column.Add(x2);
+        x3Column.Add(x3);
+        x4Column.Add(x4);
+        b1Column.Add(b1);
+      }
+
+      return new List<IList> { x1Column, x2Column, x3Column, x4Column, b1Column };
+    }
+  }
+}
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark2.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark2.cs	(revision 17400)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark2.cs	(revision 17400)
@@ -0,0 +1,61 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis {
+  public class AzzaliBenchmark2 : ArtificialRegressionDataDescriptor {
+    public override string Name { get { return "Azzali Benchmark2 B2 = ((X3 + X1) / mean(X4)) * X2"; } }
+    public override string Description { get { return "I. Azzali, L. Vanneschi, S. Silva, I. Bakurov, and M. Giacobini, “A Vectorial Approach to Genetic Programming,” EuroGP, pp. 213–227, 2019."; } }
+
+    protected override string TargetVariable { get { return "B2"; } }
+    protected override string[] VariableNames { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override string[] AllowedInputVariables { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override int TrainingPartitionStart { get { return 0; } }
+    protected override int TrainingPartitionEnd { get { return 70; } }
+    protected override int TestPartitionStart { get { return 70; } }
+    protected override int TestPartitionEnd { get { return 100; } }
+
+    public int Seed { get; private set; }
+
+    public AzzaliBenchmark2()
+      : this((int)DateTime.Now.Ticks) { }
+    public AzzaliBenchmark2(int seed)
+      : base() {
+      Seed = seed;
+    }
+
+
+    protected override List<List<double>> GenerateValues() { return null; }
+    protected override List<IList> GenerateValuesExtended() {
+      var rand = new MersenneTwister((uint)Seed);
+
+      var x1Column = new List<double>(100);
+      var x2Column = new List<double>(100);
+      var x3Column = new List<DoubleVector>(100);
+      var x4Column = new List<DoubleVector>(100);
+      var b2Column = new List<DoubleVector>(100);
+
+      for (int i = 0; i < 100; i++) {
+        var x1 = rand.NextDouble(-10, +10);
+        var x2 = rand.NextDouble(-10, +10);
+        var x3 = rand.NextDoubleVector(10, 40, 10);
+        var x4 = rand.NextDoubleVector(-5, +5, 10);
+
+        var b2 = ((x3 + x1) / x4.CumulativeMean()) * x2;
+
+        x1Column.Add(x1);
+        x2Column.Add(x2);
+        x3Column.Add(x3);
+        x4Column.Add(x4);
+        b2Column.Add(b2);
+      }
+
+      return new List<IList> { x1Column, x2Column, x3Column, x4Column, b2Column };
+    }
+  }
+}
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark3.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark3.cs	(revision 17400)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark3.cs	(revision 17400)
@@ -0,0 +1,70 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis {
+  public class AzzaliBenchmark3 : ArtificialRegressionDataDescriptor {
+    public override string Name { get { return "Azzali Benchmark2 B3 = "; } }
+    public override string Description { get { return "I. Azzali, L. Vanneschi, S. Silva, I. Bakurov, and M. Giacobini, “A Vectorial Approach to Genetic Programming,” EuroGP, pp. 213–227, 2019."; } }
+
+    protected override string TargetVariable { get { return "B3"; } }
+    protected override string[] VariableNames { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override string[] AllowedInputVariables { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override int TrainingPartitionStart { get { return 0; } }
+    protected override int TrainingPartitionEnd { get { return 70; } }
+    protected override int TestPartitionStart { get { return 70; } }
+    protected override int TestPartitionEnd { get { return 100; } }
+
+    public int Seed { get; private set; }
+
+    public AzzaliBenchmark3()
+      : this((int)DateTime.Now.Ticks) { }
+    public AzzaliBenchmark3(int seed)
+      : base() {
+      Seed = seed;
+    }
+
+
+    protected override List<List<double>> GenerateValues() { return null; }
+    protected override List<IList> GenerateValuesExtended() {
+      var rand = new MersenneTwister((uint)Seed);
+
+      var x1Column = new List<DoubleVector>(100);
+      var x2Column = new List<double>(100);
+      var x3Column = new List<double>(100);
+      var x4Column = new List<double>(100);
+      var x5Column = new List<double>(100);
+      var b3Column = new List<DoubleVector>(100);
+
+      for (int i = 0; i < 100; i++) {
+        var x1 = rand.NextDoubleVector(10, 30, 20);
+        var x2 = rand.NextDouble(50, 60);
+        var x3 = rand.NextDouble(5, 10);
+        var x4 = rand.NextDouble(-2, +2);
+        var x5 = rand.NextDouble(0, 1);
+
+        int p = 3, q = 3;
+        var cumulativeMin = new DoubleVector(
+          Enumerable.Range(0, x1.Count)
+            .Select(idx => Enumerable.Range(idx - p, q)) // build index ranges for each target entry
+            .Select(indices => indices.Select(idx => idx < 0 ? 0 : x1[idx])) // take the values from the vector (fill with 0 if outside)
+            .Select(values => values.Min())
+          );
+        var b3 = (cumulativeMin * (x2 / x3)) + x4;
+
+        x1Column.Add(x1);
+        x2Column.Add(x2);
+        x3Column.Add(x3);
+        x4Column.Add(x4);
+        b3Column.Add(b3);
+      }
+
+      return new List<IList> { x1Column, x2Column, x3Column, x4Column, x5Column, b3Column };
+    }
+  }
+}
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliKorns5.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliKorns5.cs	(revision 17400)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliKorns5.cs	(revision 17400)
@@ -0,0 +1,61 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis {
+  public class AzzaliKorns5 : ArtificialRegressionDataDescriptor {
+    public override string Name { get { return "Azzali Korns5 K5 ="; } }
+    public override string Description { get { return "I. Azzali, L. Vanneschi, S. Silva, I. Bakurov, and M. Giacobini, “A Vectorial Approach to Genetic Programming,” EuroGP, pp. 213–227, 2019."; } }
+
+    protected override string TargetVariable { get { return "K5"; } }
+    protected override string[] VariableNames { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override string[] AllowedInputVariables { get { return new string[] { "X1", "X2", "X3", "X4" }; } }
+    protected override int TrainingPartitionStart { get { return 0; } }
+    protected override int TrainingPartitionEnd { get { return 70; } }
+    protected override int TestPartitionStart { get { return 70; } }
+    protected override int TestPartitionEnd { get { return 100; } }
+
+    public int Seed { get; private set; }
+
+    public AzzaliKorns5()
+      : this((int)DateTime.Now.Ticks) { }
+    public AzzaliKorns5(int seed)
+      : base() {
+      Seed = seed;
+    }
+
+
+    protected override List<List<double>> GenerateValues() { return null; }
+    protected override List<IList> GenerateValuesExtended() {
+      var rand = new MersenneTwister((uint)Seed);
+
+      var x1Column = new List<double>(100);
+      var x2Column = new List<double>(100);
+      var x3Column = new List<double>(100);
+      var x4Column = new List<DoubleVector>(100);
+      var k5Column = new List<DoubleVector>(100);
+
+      for (int i = 0; i < 100; i++) {
+        var x1 = rand.NextDouble(-50, +50);
+        var x2 = rand.NextDouble(-50, +50);
+        var x3 = rand.NextDouble(-50, +50);
+        var x4 = rand.NextDoubleVector(-50, +50, 10);
+
+        var k5 = 3 + 2.13 * new DoubleVector(x4.Select(d4 => Math.Log(d4)));
+
+        x1Column.Add(x1);
+        x2Column.Add(x2);
+        x3Column.Add(x3);
+        x4Column.Add(x4);
+        k5Column.Add(k5);
+      }
+
+      return new List<IList> { x1Column, x2Column, x3Column, x4Column, k5Column };
+    }
+  }
+}
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/RandomExtensions.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/RandomExtensions.cs	(revision 17400)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/RandomExtensions.cs	(revision 17400)
@@ -0,0 +1,17 @@
+﻿using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis {
+  public static class RandomExtensions {
+    public static double NextDouble(this IRandom rand, double min, double max) {
+      return (max - min) * rand.NextDouble() + min;
+    }
+    public static DoubleVector NextDoubleVector(this IRandom rand, double min, double max, int length) {
+      var values = new double[length];
+      for (int i = 0; i < values.Length; i++) {
+        values[i] = rand.NextDouble(min, max);
+      }
+      return new DoubleVector(values);
+    }
+  }
+}
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VariousInstanceProvider.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VariousInstanceProvider.cs	(revision 17399)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VariousInstanceProvider.cs	(revision 17400)
@@ -50,5 +50,9 @@
       var rand = new MersenneTwister((uint)Seed);
       return new List<IDataDescriptor> {
-        new VectorDataTestOne(rand.Next())
+        new VectorDataTestOne(rand.Next()),
+        new AzzaliKorns5(rand.Next()),
+        new AzzaliBenchmark1(rand.Next()),
+        new AzzaliBenchmark2(rand.Next()),
+        new AzzaliBenchmark3(rand.Next())
       };
     }
Index: /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestOne.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestOne.cs	(revision 17399)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestOne.cs	(revision 17400)
@@ -68,11 +68,12 @@
 
       for (int i = 0; i < 100; i++) {
-        x1 = GetRandomDouble(-2, 2, rand);
-        x2 = GetRandomDouble(2, 6, rand);
-        x3 = GetRandomDouble(0, 1, rand);
+        x1 = rand.NextDouble(-2, 2);
+        x2 = rand.NextDouble(2, 6);
+        x3 = rand.NextDouble(0, 1);
         int length = rand.Next(3, 6);
-        v1 = GetRandomDoubleVector(-2, 2, length, rand);
-        v2 = GetRandomDoubleVector(3, 5, length, rand);
-        y = x1 * v1.Sum() + x2 * v2.Average();
+        v1 = rand.NextDoubleVector(-2, 2, length);
+        v2 = rand.NextDoubleVector(3, 5, length);
+
+        y = x1 * v1.Sum() + x2 * v2.Mean();
 
         x1Column.Add(x1);
@@ -86,16 +87,4 @@
       return new List<IList> { x1Column, x2Column, x3Column, v1Column, v2Column, yColumn };
     }
-
-
-    private static double GetRandomDouble(double min, double max, IRandom rand) {
-      return (max - min) * rand.NextDouble() + min;
-    }
-    private static DoubleVector GetRandomDoubleVector(double min, double max, int length, IRandom rand) {
-      var values = new double[length];
-      for (int i = 0; i < values.Length; i++) {
-        values[i] = GetRandomDouble(min, max, rand);
-      }
-      return new DoubleVector(values);
-    }
   }
 }
Index: /branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/ConstantOptimizationWithVectorsTest.cs
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/ConstantOptimizationWithVectorsTest.cs	(revision 17400)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/ConstantOptimizationWithVectorsTest.cs	(revision 17400)
@@ -0,0 +1,5 @@
+﻿namespace HeuristicLab.Tests.HeuristicLab.Problems.DataAnalysis {
+  public class ConstantOptimizationWithVectorsTest {
+
+  }
+}
Index: /branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 17399)
+++ /branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 17400)
@@ -598,4 +598,5 @@
     <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\OnlineCalculatorPerformanceTest.cs" />
     <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\StatisticCalculatorsTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\ConstantOptimizationWithVectorsTest.cs" />
     <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\DeriveTest.cs" />
     <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\InfixExpressionParserTest.cs" />
