Index: /trunk/sources/HeuristicLab 3.3.sln
===================================================================
--- /trunk/sources/HeuristicLab 3.3.sln	(revision 14474)
+++ /trunk/sources/HeuristicLab 3.3.sln	(revision 14475)
@@ -2,5 +2,5 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.25420.1
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{96396439-A764-4022-A8D2-BE021449B8D1}"
@@ -420,5 +420,5 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4", "HeuristicLab.Algorithms.CMAEvolutionStrategy\3.4\HeuristicLab.Algorithms.CMAEvolutionStrategy-3.4.csproj", "{291010E4-2F4E-4D29-A795-753CFF293FDB}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.LinearLinkageEncoding-3.3", "HeuristicLab.Encodings.LinearLinkageEncoding\3.3\HeuristicLab.Encodings.LinearLinkageEncoding-3.3.csproj", "{BE698769-975A-429E-828C-72BB2B6182C8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.LinearLinkageEncoding-3.4", "HeuristicLab.Encodings.LinearLinkageEncoding\3.3\HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj", "{BE698769-975A-429E-828C-72BB2B6182C8}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Orienteering-3.3", "HeuristicLab.Problems.Orienteering\3.3\HeuristicLab.Problems.Orienteering-3.3.csproj", "{D1EFA4CC-909F-41D5-9C1F-C3AF1957A372}"
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/ExactGroupsLinearLinkageCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/ExactGroupsLinearLinkageCreator.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/ExactGroupsLinearLinkageCreator.cs	(revision 14475)
@@ -56,5 +56,4 @@
 
     public static LinearLinkage Apply(IRandom random, int length, int groups) {
-      var solution = new LinearLinkage(length);
       var groupNumbers = Enumerable.Range(0, length).Select(x => x % groups).Shuffle(random);
       var grouping = Enumerable.Range(0, groups).Select(x => new List<int>()).ToList();
@@ -63,6 +62,5 @@
         grouping[g].Add(idx++);
 
-      solution.SetGroups(grouping);
-      return solution;
+      return LinearLinkage.FromGroups(length, grouping);
     }
 
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/MaxGroupsLinearLinkageCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/MaxGroupsLinearLinkageCreator.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/MaxGroupsLinearLinkageCreator.cs	(revision 14475)
@@ -55,10 +55,8 @@
 
     public static LinearLinkage Apply(IRandom random, int length, int maxGroups) {
-      var solution = new LinearLinkage(length);
       var groups = Enumerable.Range(0, length).Select(x => Tuple.Create(x, random.Next(maxGroups)))
                                               .GroupBy(x => x.Item2)
                                               .Select(x => x.Select(y => y.Item1).ToList());
-      solution.SetGroups(groups);
-      return solution;
+      return LinearLinkage.FromGroups(length, groups);
     }
 
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/RandomLinearLinkageCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/RandomLinearLinkageCreator.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Creators/RandomLinearLinkageCreator.cs	(revision 14475)
@@ -41,10 +41,8 @@
 
     public static LinearLinkage Apply(IRandom random, int length) {
-      var solution = new LinearLinkage(length);
       var groups = Enumerable.Range(0, length).Select(x => Tuple.Create(x, random.Next(length)))
                                               .GroupBy(x => x.Item2)
                                               .Select(x => x.Select(y => y.Item1).ToList());
-      solution.SetGroups(groups);
-      return solution;
+      return LinearLinkage.FromGroups(length, groups);
     }
 
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/GreedyPartitionCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/GreedyPartitionCrossover.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/GreedyPartitionCrossover.cs	(revision 14475)
@@ -44,6 +44,4 @@
     public static LinearLinkage Apply(IRandom random, ItemArray<LinearLinkage> parents) {
       var len = parents[0].Length;
-
-      var child = new LinearLinkage(len);
       var childGroup = new List<HashSet<int>>();
       var currentParent = random.Next(parents.Length);
@@ -69,6 +67,5 @@
       } while (remaining);
 
-      child.SetGroups(childGroup);
-      return child;
+      return LinearLinkage.FromGroups(len, childGroup);
     }
 
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/GroupCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/GroupCrossover.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/GroupCrossover.cs	(revision 14475)
@@ -39,30 +39,41 @@
       return new GroupCrossover(this, cloner);
     }
-
+    
     public static LinearLinkage Apply(IRandom random, LinearLinkage p1, LinearLinkage p2) {
       var length = p1.Length;
-      var child = new LinearLinkage(length);
-      var endNodes = new HashSet<int>();
-      for (var i = 0; i < length; i++) {
-        if ((p1[i] == i && p2[i] == i)
-          || ((p1[i] == i || p2[i] == i) && random.NextDouble() < 0.5)) {
-          child[i] = i;
-          endNodes.Add(i);
+      var lleeP1 = p1.ToEndLinks();
+      var lleeP2 = p2.ToEndLinks();
+      var lleeChild = new int[length];
+      var isTransfered = new bool[length];
+
+      for (var i = p1.Length - 1; i >= 0; i--) {
+        lleeChild[i] = i;
+
+        // Step 1
+        var isEndP1 = p1[i] == i;
+        var isEndP2 = p2[i] == i;
+        if (isEndP1 & isEndP2 || (isEndP1 | isEndP2 && random.NextDouble() < 0.5)) {
+          isTransfered[i] = true;
+          continue;
+        }
+
+        // Step 2
+        var end1 = lleeP1[i];
+        var end2 = lleeP2[i];
+
+        if (isTransfered[end1] & isTransfered[end2]) {
+          var end = random.NextDouble() < 0.5 ? end1 : end2;
+          lleeChild[i] = end;
+        } else if (isTransfered[end1]) {
+          lleeChild[i] = end1;
+        } else if (isTransfered[end2]) {
+          lleeChild[i] = end2;
+        } else {
+          var next = random.NextDouble() < 0.5 ? p1[i] : p2[i];
+          var end = lleeChild[next];
+          lleeChild[i] = end;
         }
       }
-      for (var i = 0; i < length; i++) {
-        if (endNodes.Contains(i)) continue;
-        var p1End = endNodes.Contains(p1[i]);
-        var p2End = endNodes.Contains(p2[i]);
-        if ((p1End && p2End) || (!p1End && !p2End)) {
-          child[i] = random.NextDouble() < 0.5 ? p1[i] : p2[i];
-        } else if (p1End) {
-          child[i] = p1[i];
-        } else {
-          child[i] = p2[i];
-        }
-      }
-      child.LinearizeTreeStructures();
-      return child;
+      return LinearLinkage.FromEndLinks(lleeChild);
     }
 
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/LowestIndexFirstCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/LowestIndexFirstCrossover.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/LowestIndexFirstCrossover.cs	(revision 14475)
@@ -43,5 +43,5 @@
       var len = parents[0].Length;
       var p = random.Next(parents.Length);
-      var child = new LinearLinkage(len);
+      var child = LinearLinkage.SingleElementGroups(len);
       var remaining = new SortedSet<int>(Enumerable.Range(0, len));
       do {
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/LowestIndexMaxCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/LowestIndexMaxCrossover.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/LowestIndexMaxCrossover.cs	(revision 14475)
@@ -44,5 +44,5 @@
     public static LinearLinkage Apply(IRandom random, ItemArray<LinearLinkage> parents) {
       var len = parents[0].Length;
-      var child = new LinearLinkage(len);
+      var child = LinearLinkage.SingleElementGroups(len);
       var remaining = new SortedSet<int>(Enumerable.Range(0, len));
       do {
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/SinglePointCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 14475)
@@ -41,5 +41,5 @@
     public static LinearLinkage Apply(IRandom random, LinearLinkage p1, LinearLinkage p2) {
       var length = p1.Length;
-      var child = new LinearLinkage(length);
+      var child = LinearLinkage.SingleElementGroups(length);
       var bp = random.Next(length - 1);
       for (var i = 0; i <= bp; i++) child[i] = p1[i];
Index: unk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/HeuristicLab.Encodings.LinearLinkageEncoding-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/HeuristicLab.Encodings.LinearLinkageEncoding-3.3.csproj	(revision 14474)
+++ 	(revision )
@@ -1,220 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{BE698769-975A-429E-828C-72BB2B6182C8}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>HeuristicLab.Encodings.LinearLinkageEncoding</RootNamespace>
-    <AssemblyName>HeuristicLab.Encodings.LinearLinkageEncoding-3.3</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
-    <DocumentationFile>
-    </DocumentationFile>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <DocumentationFile>
-    </DocumentationFile>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <DocumentationFile>
-    </DocumentationFile>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
-      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
-      <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
-      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
-      <Name>HeuristicLab.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
-      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
-      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
-      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
-      <Name>HeuristicLab.Optimization-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
-      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
-      <Name>HeuristicLab.Parameters-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
-      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
-      <Name>HeuristicLab.Persistence-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
-      <Project>{f4539fb6-4708-40c9-be64-0a1390aea197}</Project>
-      <Name>HeuristicLab.Random-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Creators\ExactGroupsLinearLinkageCreator.cs" />
-    <Compile Include="Creators\MaxGroupsLinearLinkageCreator.cs" />
-    <Compile Include="Creators\RandomLinearLinkageCreator.cs" />
-    <Compile Include="Crossovers\GreedyPartitionCrossover.cs" />
-    <Compile Include="Crossovers\GroupCrossover.cs" />
-    <Compile Include="Crossovers\LowestIndexMaxCrossover.cs" />
-    <Compile Include="Crossovers\MultiLLECrossover.cs" />
-    <Compile Include="Crossovers\SinglePointCrossover.cs" />
-    <Compile Include="Interfaces\ILinearLinkageMoveOperator.cs" />
-    <Compile Include="Interfaces\ILinearLinkageSwap2MoveOperator.cs" />
-    <Compile Include="Interfaces\ILinearLinkageCreator.cs" />
-    <Compile Include="LinearLinkage.cs" />
-    <Compile Include="LinearLinkageCreator.cs" />
-    <Compile Include="LinearLinkageEncoding.cs" />
-    <Compile Include="LinearLinkageManipulator.cs" />
-    <Compile Include="LinearLinkageCrossover.cs" />
-    <Compile Include="Manipulators\GraftManipulator.cs" />
-    <Compile Include="Manipulators\MoveItemManipulator.cs" />
-    <Compile Include="Manipulators\MergeGroupManipulator.cs" />
-    <Compile Include="Manipulators\MultiLLEManipulator.cs" />
-    <Compile Include="Moves\Swap\ExhaustiveSwap2MoveGenerator.cs" />
-    <Compile Include="Moves\Swap\StochasticSwap2MultiMoveGenerator.cs" />
-    <Compile Include="Moves\Swap\StochasticSwap2SingleMoveGenerator.cs" />
-    <Compile Include="Moves\Swap\Swap2Move.cs" />
-    <Compile Include="Moves\Swap\Swap2MoveGenerator.cs" />
-    <Compile Include="Moves\Swap\Swap2MoveMaker.cs" />
-    <Compile Include="ShakingOperators\LLEShakingOperator.cs" />
-    <None Include="HeuristicLab.snk" />
-    <None Include="Plugin.cs.frame" />
-    <Compile Include="Crossovers\LowestIndexFirstCrossover.cs" />
-    <Compile Include="Interfaces\ILinearLinkageCrossover.cs" />
-    <Compile Include="Interfaces\ILinearLinkageManipulator.cs" />
-    <Compile Include="Interfaces\ILinearLinkageOperator.cs" />
-    <Compile Include="Interfaces\ILinearLinkageShakingOperator.cs" />
-    <Compile Include="Manipulators\SplitGroupManipulator.cs" />
-    <Compile Include="Manipulators\SwapItemManipulator.cs" />
-    <Compile Include="Plugin.cs" />
-    <None Include="Properties\AssemblyInfo.cs.frame" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
-set ProjectDir=$(ProjectDir)
-set SolutionDir=$(SolutionDir)
-set Outdir=$(Outdir)
-
-call PreBuildEvent.cmd
-    </PreBuildEvent>
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-export ProjectDir=$(ProjectDir)
-export SolutionDir=$(SolutionDir)
-
-$SolutionDir/PreBuildEvent.sh
-    </PreBuildEvent>
-  </PropertyGroup>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj	(revision 14475)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj	(revision 14475)
@@ -0,0 +1,221 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{BE698769-975A-429E-828C-72BB2B6182C8}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Encodings.LinearLinkageEncoding</RootNamespace>
+    <AssemblyName>HeuristicLab.Encodings.LinearLinkageEncoding-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <DocumentationFile>
+    </DocumentationFile>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
+      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
+      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{f4539fb6-4708-40c9-be64-0a1390aea197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Creators\ExactGroupsLinearLinkageCreator.cs" />
+    <Compile Include="Creators\MaxGroupSizeLinearLinkageCreator.cs" />
+    <Compile Include="Creators\MaxGroupsLinearLinkageCreator.cs" />
+    <Compile Include="Creators\RandomLinearLinkageCreator.cs" />
+    <Compile Include="Crossovers\GreedyPartitionCrossover.cs" />
+    <Compile Include="Crossovers\GroupCrossover.cs" />
+    <Compile Include="Crossovers\LowestIndexMaxCrossover.cs" />
+    <Compile Include="Crossovers\MultiLLECrossover.cs" />
+    <Compile Include="Crossovers\SinglePointCrossover.cs" />
+    <Compile Include="Interfaces\ILinearLinkageMoveOperator.cs" />
+    <Compile Include="Interfaces\ILinearLinkageSwap2MoveOperator.cs" />
+    <Compile Include="Interfaces\ILinearLinkageCreator.cs" />
+    <Compile Include="LinearLinkage.cs" />
+    <Compile Include="LinearLinkageCreator.cs" />
+    <Compile Include="LinearLinkageEncoding.cs" />
+    <Compile Include="LinearLinkageManipulator.cs" />
+    <Compile Include="LinearLinkageCrossover.cs" />
+    <Compile Include="Manipulators\GraftManipulator.cs" />
+    <Compile Include="Manipulators\MoveItemManipulator.cs" />
+    <Compile Include="Manipulators\MergeGroupManipulator.cs" />
+    <Compile Include="Manipulators\MultiLLEManipulator.cs" />
+    <Compile Include="Moves\Swap\ExhaustiveSwap2MoveGenerator.cs" />
+    <Compile Include="Moves\Swap\StochasticSwap2MultiMoveGenerator.cs" />
+    <Compile Include="Moves\Swap\StochasticSwap2SingleMoveGenerator.cs" />
+    <Compile Include="Moves\Swap\Swap2Move.cs" />
+    <Compile Include="Moves\Swap\Swap2MoveGenerator.cs" />
+    <Compile Include="Moves\Swap\Swap2MoveMaker.cs" />
+    <Compile Include="ShakingOperators\LLEShakingOperator.cs" />
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <Compile Include="Crossovers\LowestIndexFirstCrossover.cs" />
+    <Compile Include="Interfaces\ILinearLinkageCrossover.cs" />
+    <Compile Include="Interfaces\ILinearLinkageManipulator.cs" />
+    <Compile Include="Interfaces\ILinearLinkageOperator.cs" />
+    <Compile Include="Interfaces\ILinearLinkageShakingOperator.cs" />
+    <Compile Include="Manipulators\SplitGroupManipulator.cs" />
+    <Compile Include="Manipulators\SwapItemManipulator.cs" />
+    <Compile Include="Plugin.cs" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+    </PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+    </PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/LinearLinkage.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/LinearLinkage.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/LinearLinkage.cs	(revision 14475)
@@ -37,6 +37,65 @@
     private LinearLinkage(LinearLinkage original, Cloner cloner) : base(original, cloner) { }
     public LinearLinkage() { }
-    public LinearLinkage(int length) : base(length) { }
-    public LinearLinkage(int[] elements) : base(elements) { }
+
+    private LinearLinkage(int length) : base(length) { }
+    private LinearLinkage(int[] elements) : base(elements) { }
+
+    /// <summary>
+    /// Create a new LinearLinkage object where every element is in a seperate group.
+    /// </summary>
+    public static LinearLinkage SingleElementGroups(int length) {
+      var elements = new int[length];
+      for (var i = 0; i < length; i++) {
+        elements[i] = i;
+      }
+      return new LinearLinkage(elements);
+    }
+
+    /// <summary>
+    /// Create a new LinearLinkage object from an int[] in LLE
+    /// </summary>
+    /// <remarks>
+    /// This operation checks if the argument is a well formed LLE
+    /// and throws an ArgumentException otherwise.
+    /// </remarks>
+    /// <param name="lle">The LLE representation</param>
+    public static LinearLinkage FromForwardLinks(int[] lle) {
+      if (!Validate(lle)) {
+        throw new ArgumentException("Array is malformed and does not represent a valid LLE forward encoding.", "elements");
+      }
+      return new LinearLinkage(lle);
+    }
+
+    /// <summary>
+    /// Create a new LinearLinkage object by parsing an LLE-e representation
+    /// and modifing the underlying array so that it is in LLE representation.
+    /// </summary>
+    /// <remarks>
+    /// This operation runs in O(n) time, but requires additional memory
+    /// in form of a int[].
+    /// </remarks>
+    /// <param name="llee">The LLE-e representation</param>
+    /// <returns>LinearLinkage</returns>
+    public static LinearLinkage FromEndLinks(int[] llee) {
+      var result = new LinearLinkage(llee.Length);
+      result.SetEndLinks(llee);
+      return result;
+    }
+
+    /// <summary>
+    /// Create a new LinearLinkage object by translating
+    /// an enumeration of groups into the underlying array representation.
+    /// </summary>
+    /// <remarks>
+    /// Throws an ArgumentException when there is an element assigned to
+    /// multiple groups or elements that are not assigned to any group.
+    /// </remarks>
+    /// <param name="grouping">The grouping of the elements, each element must
+    /// be part of exactly one group.</param>
+    public static LinearLinkage FromGroups(int length, IEnumerable<IEnumerable<int>> grouping) {
+      var result = new LinearLinkage(length);
+      result.SetGroups(grouping);
+      return result;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -55,23 +114,42 @@
     public IEnumerable<List<int>> GetGroups() {
       var len = array.Length;
-      var remaining = new HashSet<int>(Enumerable.Range(0, len));
+      var used = new bool[len];
+      for (var i = 0; i < len; i++) {
+        if (used[i]) continue;
+        var curr = i;
+        var next = array[curr];
+        var group = new List<int> { curr };
+        while (next > curr && next < len && !used[next]) {
+          used[curr] = true;
+          curr = next;
+          next = array[next];
+          group.Add(curr);
+        }
+        if (curr != next) throw new ArgumentException("Array is malformed and does not represent a valid LLE forward encoding.");
+        used[curr] = true;
+        yield return group;
+      }
+      /*
+      var len = array.Length;
+      var used = new bool[len];
       // iterate from lowest to highest index
       for (var i = 0; i < len; i++) {
-        if (!remaining.Contains(i)) continue;
+        if (used[i]) continue;
         var group = new List<int> { i };
-        remaining.Remove(i);
+        used[i] = true;
         var next = array[i];
-        if (next != i) {
-          int prev;
-          do {
-            group.Add(next);
-            if (!remaining.Remove(next))
-              throw new ArgumentException("Array is malformed and does not represent a valid LLE forward encoding.");
-            prev = next;
-            next = array[next];
-          } while (next != prev);
+        if (next < i || next >= len) {
+          throw new ArgumentException("Array is malformed and does not represent a valid LLE forward encoding.");
+        }
+        while (next != array[next]) {
+          if (next < 0 || next >= len || used[next]) {
+            throw new ArgumentException("Array is malformed and does not represent a valid LLE forward encoding.");
+          }
+          group.Add(next);
+          used[next] = true;
+          next = array[next];
         }
         yield return group;
-      }
+      }*/
     }
 
@@ -151,17 +229,20 @@
     public void SetGroups(IEnumerable<IEnumerable<int>> grouping) {
       var len = array.Length;
-      var remaining = new HashSet<int>(Enumerable.Range(0, len));
+      var used = new bool[len];
       foreach (var group in grouping) {
         var prev = -1;
         foreach (var g in group.OrderBy(x => x)) {
+          if (g < prev || g >= len) throw new ArgumentException(string.Format("Element {0} is bigger than {1} or smaller than 0.", g, len - 1), "grouping");
           if (prev >= 0) array[prev] = g;
           prev = g;
-          if (!remaining.Remove(prev))
+          if (used[prev]) {
             throw new ArgumentException(string.Format("Element {0} is contained at least twice.", prev), "grouping");
-        }
-        if (prev >= 0) array[prev] = prev;
-      }
-      if (remaining.Count > 0)
-        throw new ArgumentException(string.Format("Elements are not assigned a group: {0}", string.Join(", ", remaining)));
+          }
+          used[prev] = true;
+        }
+        array[prev] = prev;
+      }
+      if (!used.All(x => x))
+        throw new ArgumentException(string.Format("Elements are not assigned a group: {0}", string.Join(", ", used.Select((x, i) => new { x, i }).Where(x => !x.x).Select(x => x.i))));
     }
 
@@ -175,19 +256,23 @@
     /// <returns>True if the encoding is valid.</returns>
     public bool Validate() {
+      return Validate(array);
+    }
+
+    private static bool Validate(int[] array) {
       var len = array.Length;
-      var remaining = new HashSet<int>(Enumerable.Range(0, len));
+      var used = new bool[len];
       for (var i = 0; i < len; i++) {
-        if (!remaining.Contains(i)) continue;
-        remaining.Remove(i);
-        var next = array[i];
-        if (next == i) continue;
-        int prev;
-        do {
-          if (!remaining.Remove(next)) return false;
-          prev = next;
+        if (used[i]) continue;
+        var curr = i;
+        var next = array[curr];
+        while (next > curr && next < len && !used[next]) {
+          used[curr] = true;
+          curr = next;
           next = array[next];
-        } while (next != prev);
-      }
-      return remaining.Count == 0;
+        }
+        if (curr!=next) return false;
+        used[curr] = true;
+      }
+      return true;
     }
 
@@ -216,7 +301,7 @@
     public void LinearizeTreeStructures() {
       // Step 1: Convert the array into LLE-e
-      ToLLEeInplace(array);
+      ToEndLinksInplace(array);
       // Step 2: For all groups linearize the links
-      FromLLEe(array);
+      SetEndLinks(array);
     }
 
@@ -233,15 +318,19 @@
     /// </remarks>
     /// <returns>An integer array in LLE-e representation</returns>
-    public int[] ToLLEe() {
+    public int[] ToEndLinks() {
       var result = (int[])array.Clone();
-      ToLLEeInplace(result);
+      ToEndLinksInplace(result);
       return result;
     }
 
-    private void ToLLEeInplace(int[] a) {
-      var length = a.Length;
+    private static void ToEndLinksInplace(int[] array) {
+      var length = array.Length;
       for (var i = length - 1; i >= 0; i--) {
-        if (array[i] == i) a[i] = i;
-        else a[i] = a[a[i]];
+        var next = array[i];
+        if (next > i) {
+          array[i] = array[next];
+        } else if (next < i) {
+          throw new ArgumentException("Array is malformed and does not represent a valid LLE encoding.", "array");
+        }
       }
     }
@@ -253,18 +342,23 @@
     /// <remarks>
     /// This operation runs in O(n) time, but requires additional memory
-    /// in form of a dictionary.
+    /// in form of a int[].
     /// </remarks>
     /// <param name="llee">The LLE-e representation</param>
-    public void FromLLEe(int[] llee) {
+    public void SetEndLinks(int[] llee) {
       var length = array.Length;
-      var groups = new Dictionary<int, int>();
+      if (length != llee.Length) {
+        throw new ArgumentException(string.Format("Expected length {0} but length was {1}", length, llee.Length), "llee");
+      }
+      // If we are ok with mutating llee we can avoid this clone
+      var lookup = (int[])llee.Clone();
       for (var i = length - 1; i >= 0; i--) {
-        if (llee[i] == i) {
-          array[i] = i;
-          groups[i] = i;
+        var end = llee[i];
+        if (end == i) {
+          array[i] = end;
+        } else if (end > i && end < length) {
+          array[i] = lookup[end];
+          lookup[end] = i;
         } else {
-          var g = llee[i];
-          array[i] = groups[g];
-          groups[g] = i;
+          throw new ArgumentException("Array is malformed and does not represent a valid LLE end encoding.", "llee");
         }
       }
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Plugin.cs.frame	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Plugin.cs.frame	(revision 14475)
@@ -23,6 +23,6 @@
 
 namespace HeuristicLab.Encodings.LinearLinkageEncoding {
-  [Plugin("HeuristicLab.Encodings.LinearLinkageEncoding", "Provides data structures and operators for the linear linkage encoding (LLE).", "3.3.14.$WCREV$")]
-  [PluginFile("HeuristicLab.Encodings.LinearLinkageEncoding-3.3.dll", PluginFileType.Assembly)]
+  [Plugin("HeuristicLab.Encodings.LinearLinkageEncoding", "Provides data structures and operators for the linear linkage encoding (LLE).", "3.4.14.$WCREV$")]
+  [PluginFile("HeuristicLab.Encodings.LinearLinkageEncoding-3.4.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Properties/AssemblyInfo.cs.frame	(revision 14474)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/Properties/AssemblyInfo.cs.frame	(revision 14475)
@@ -53,4 +53,4 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.14.$WCREV$")]
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.14.$WCREV$")]
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Termination/MultiTerminator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Termination/MultiTerminator.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Termination/MultiTerminator.cs	(revision 14475)
@@ -38,5 +38,5 @@
       get { return HeuristicLab.Common.Resources.VSImageLibrary.FlagRed; }
     }
-
+    
     public ILookupParameter<BoolValue> TerminateParameter {
       get { return (ILookupParameter<BoolValue>)Parameters["Terminate"]; }
Index: /trunk/sources/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 14474)
+++ /trunk/sources/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 14475)
@@ -149,7 +149,7 @@
       <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.LinearLinkageEncoding\3.3\HeuristicLab.Encodings.LinearLinkageEncoding-3.3.csproj">
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.LinearLinkageEncoding\3.3\HeuristicLab.Encodings.LinearLinkageEncoding-3.4.csproj">
       <Project>{be698769-975a-429e-828c-72bb2b6182c8}</Project>
-      <Name>HeuristicLab.Encodings.LinearLinkageEncoding-3.3</Name>
+      <Name>HeuristicLab.Encodings.LinearLinkageEncoding-3.4</Name>
       <Private>False</Private>
     </ProjectReference>
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs	(revision 14474)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs	(revision 14475)
@@ -49,13 +49,13 @@
     public bool Maximization { get { return false; } }
 
-    private bool[,] allowedTogether;
+    private bool[,] adjacencyMatrix;
       
     public override void Initialize() {
       var encoding = new LinearLinkageEncoding(""lle"", length: ProblemSize);
-      allowedTogether = new bool[encoding.Length, encoding.Length];
+      adjacencyMatrix = new bool[encoding.Length, encoding.Length];
       var random = new System.Random(13);
       for (var i = 0; i < encoding.Length - 1; i++)
         for (var j = i + 1; j < encoding.Length; j++)
-          allowedTogether[i, j] = allowedTogether[j, i] = random.Next(2) == 0;
+          adjacencyMatrix[i, j] = adjacencyMatrix[j, i] = random.Next(2) == 0;
       
       Encoding = encoding;
@@ -68,8 +68,9 @@
         for (var j = 0; j < groups[i].Count; j++)
           for (var k = j + 1; k < groups[i].Count; k++)
-            if (!allowedTogether[groups[i][j], groups[i][k]]) penalty++;
+            if (!adjacencyMatrix[groups[i][j], groups[i][k]]) penalty++;
       }
-      if (penalty > 0) return penalty + ProblemSize;
-      else return groups.Count;
+      var result = groups.Count;
+      if (penalty > 0) result += penalty + ProblemSize;
+      return result;
     }
 
@@ -105,7 +106,7 @@
       ga.SetSeedRandomly.Value = false;
       SamplesUtils.RunAlgorithm(ga);
-      Assert.AreEqual(26, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
-      Assert.AreEqual(27.58, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
-      Assert.AreEqual(105, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(127, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(129,38, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(132, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
       Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
     }
@@ -121,6 +122,6 @@
       #endregion
       #region Algorithm Configuration
-      ga.Name = "Genetic Algorithm - Grouping Problem";
-      ga.Description = "A genetic algorithm which solves a grouping problem using the linear linkage encoding.";
+      ga.Name = "Genetic Algorithm - Graph Coloring";
+      ga.Description = "A genetic algorithm which solves a graph coloring problem using the linear linkage encoding.";
       ga.Problem = problem;
       SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, MultiLinearLinkageCrossover, MultiLinearLinkageManipulator>(
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs	(revision 14475)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs	(revision 14475)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  public static class Auxiliary {
+    public static bool LinearLinkageIsEqualByPosition(LinearLinkage p1, LinearLinkage p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (!p1[i].Equals(p2[i])) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs	(revision 14475)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs	(revision 14475)
@@ -0,0 +1,98 @@
+﻿using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass()]
+  public class ConversionsTest {
+    private readonly int[][] validForwardEncoding = new[]{
+      new int[0], new[] {0},
+      new[] {0, 1}, new[] {1, 1},
+      new[] {0, 1, 2}, new[] {1, 1, 2}, new[] {2, 1, 2},
+      new[] {0, 2, 2}, new[] {1, 2, 2},
+      new[] {0, 1, 2, 3}, new[] {1, 1, 2, 3}, new[] {2, 1, 2, 3}, new[] {3, 1, 2, 3},
+      new[] {0, 1, 3, 3}, new[] {1, 2, 2, 3}, new[] {2, 1, 3, 3}, new[] {3, 2, 2, 3},
+      new[] {0, 2, 2, 3}, new[] {1, 3, 2, 3},
+      new[] {0, 2, 3, 3}
+    };
+    private readonly int[][] invalidForwardEncoding = new[]{
+      new [] {-1}, new [] {1}, new [] {1, 0},
+      new [] {0, 0, 0}, new [] {0, 0, 1}, new [] {0, 0, 2},
+      new [] {0, 1, 0},
+      new [] {0, 2, 0}, new [] {0, 2, 1},
+      new [] {1, 0, 0}, new [] {1, 0, 1}, new [] {1, 0, 2},
+      new [] {1, 1, 0}, new [] {1, 1, 1},
+      new [] {1, 2, 0}, new [] {1, 2, 1},
+      new [] {2, 0, 0}, new [] {2, 0, 1}, new [] {2, 0, 2},
+      new [] {2, 1, 0}, new [] {2, 1, 1},
+      new [] {2, 2, 0}, new [] {2, 2, 1}, new [] {2, 2, 2},
+    };
+    private readonly int[][] invalidEndEncoding = new[]{
+      new [] {-1}, new [] {1}, new [] {1, 0},
+      new [] {0, 0, 1}, new [] {0, 0, 2},
+      new [] {0, 1, 0},
+      new [] {0, 2, 0}, new [] {0, 2, 1},
+      new [] {1, 0, 0}, new [] {1, 0, 1}, new [] {1, 0, 2},
+      new [] {1, 1, 0}, new [] {1, 1, 1},
+      new [] {1, 2, 0}, new [] {1, 2, 1},
+      new [] {2, 0, 0}, new [] {2, 0, 1}, new [] {2, 0, 2},
+      new [] {2, 1, 0}, new [] {2, 1, 1},
+      new [] {2, 2, 0}, new [] {2, 2, 1},
+    };
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void EndLinksRoundtripTest() {
+      foreach (var values in validForwardEncoding) {
+        var expected = LinearLinkage.FromForwardLinks(values);
+        var llee = expected.ToEndLinks();
+        var actual = LinearLinkage.FromEndLinks(llee);
+        Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, actual),
+          "[{0}] did not roundtrip successfully!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void GroupsRoundtripTest() {
+      foreach (var values in validForwardEncoding) {
+        var expected = LinearLinkage.FromForwardLinks(values);
+        var groups = expected.GetGroups();
+        var actual = LinearLinkage.FromGroups(expected.Length, groups);
+        Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, actual),
+          "[{0}] did not roundtrip successfully!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void InvalidForwardLinksTest() {
+      foreach (var values in invalidForwardEncoding) {
+        var isValid = true;
+        try {
+          var lle = LinearLinkage.FromForwardLinks(values);
+        } catch (ArgumentException e) {
+          isValid = false;
+        }
+        Assert.IsFalse(isValid, "[{0}] is invalid and should throw ArgumentException!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void InvalidEndLinksTest() {
+      foreach (var values in invalidEndEncoding) {
+        var isValid = true;
+        try {
+          var lle = LinearLinkage.FromEndLinks(values);
+        } catch (ArgumentException e) {
+          isValid = false;
+        }
+        Assert.IsFalse(isValid, "{0} should be invalid", string.Join(", ", values));
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs	(revision 14475)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs	(revision 14475)
@@ -0,0 +1,53 @@
+﻿using System;
+using HeuristicLab.Random;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass()]
+  public class GroupCrossoverTest {
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void EqualParentsTest() {
+      var random = new FastRandom(0);
+      var parent = LinearLinkage.SingleElementGroups(10);
+      var child = GroupCrossover.Apply(random, parent, parent);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(parent, child));
+
+      parent = RandomLinearLinkageCreator.Apply(random, 10);
+      child = GroupCrossover.Apply(random, parent, parent);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(parent, child));
+    }
+
+    // Example from paper:
+    // Multi-objective Genetic Algorithms for grouping problems. Korkmaz, E.E. Applied Intelligence (2010) 33: 179. 
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void ExampleFromPaperTest() {
+      var parent1 = LinearLinkage.FromEndLinks(new[] { 3, 4, 3, 3, 4 });
+
+      var parent2 = LinearLinkage.FromEndLinks(new[] { 2, 2, 2, 4, 4 });
+
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 4, 2, 3, 4 }, new[] { 0.0, 0.0, 0.0, 0.0 }); // (i)
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 3, 4 }, new[] { 0.0, 0.0, 0.0, 0.9 }); // (iv)
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 2, 2, 3, 4 }, new[] { 0.0, 0.0, 0.9, 0.0 }); // (iii)
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 2, 2, 3, 4 }, new[] { 0.0, 0.0, 0.9, 0.9 }); // (ii)
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 4, 3, 3, 4 }, new[] { 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 4, 4 }, new[] { 0.9, 0.0, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 2, 2, 4, 4 }, new[] { 0.9, 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 4, 4, 4 }, new[] { 0.9, 0.9, 0.0, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 4, 4, 4 }, new[] { 0.9, 0.9, 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 4, 4 }, new[] { 0.9, 0.9, 0.9, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 2, 4, 4 }, new[] { 0.9, 0.9, 0.9, 0.9 });
+    }
+
+    private void CheckGroupCrossover(LinearLinkage parent1, LinearLinkage parent2, int[] expectedllee, double[] randomNumbers) {
+      var expected = LinearLinkage.FromEndLinks(expectedllee);
+      var random = new TestRandom() { DoubleNumbers = randomNumbers };
+      var child = GroupCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, child), "Expected [{0}] but was [{1}]!", string.Join(", ", expected), string.Join(", ", child));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14474)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14475)
@@ -198,8 +198,7 @@
       <HintPath>..\bin\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll</HintPath>
     </Reference>
-    <Reference Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\bin\HeuristicLab.Encodings.LinearLinkageEncoding-3.3.dll</HintPath>
-      <Private>False</Private>
+    <Reference Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Encodings.LinearLinkageEncoding-3.4.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3">
@@ -510,4 +509,7 @@
     <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\SinglePointCrossoverTest.cs" />
     <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\UniformOnePositionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\ConversionsTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\GroupCrossoverTest.cs" />
     <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\Auxiliary.cs" />
     <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\CosaCrossoverTest.cs" />
