Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs	(revision 14244)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs	(revision 14244)
@@ -0,0 +1,82 @@
+﻿#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
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphLayoutTest {
+    [TestMethod]
+    public void TestFruchtermanReingold() {
+      var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      });
+      Assert.AreEqual(5, graph.Vertices);
+      try {
+        using (var matrix = graph.LayoutWithFruchtermanReingold()) {
+          Assert.AreEqual(5, matrix.Rows);
+          Assert.AreEqual(2, matrix.Columns);
+        }
+      } catch { Assert.Fail("Layouting with fruchterman-reingold using default parameters failed."); }
+
+      try {
+        using (var matrix = new Matrix(1, 1)) {
+          graph.LayoutWithFruchtermanReingold(50, 2, matrix);
+        }
+        Assert.Fail("Layouting with fruchterman-reingold using too little pre-initialized coordinates failed.");
+      } catch (ArgumentException) { }
+
+      try {
+        using (var matrix = new Matrix(7, 3)) {
+          graph.LayoutWithFruchtermanReingold(50, 2, matrix);
+          Assert.Fail("Layouting with fruchterman-reingold using too many pre-initialized coordinates failed.");
+        }
+      } catch (ArgumentException) { }
+
+      try {
+        using (var matrix = new Matrix(5, 2)) {
+          matrix[0, 0] = matrix[0, 1] = 1;
+          matrix[1, 0] = matrix[1, 1] = 2;
+          matrix[2, 0] = matrix[2, 1] = 3;
+          matrix[3, 0] = matrix[3, 1] = 4;
+          matrix[4, 0] = matrix[4, 1] = 5;
+          graph.LayoutWithFruchtermanReingold(50, 2, matrix);
+          Assert.AreEqual(5, matrix.Rows);
+          Assert.AreEqual(2, matrix.Columns);
+          Assert.IsFalse(
+               matrix[0, 0].IsAlmost(1) && matrix[0, 1].IsAlmost(1)
+            && matrix[1, 0].IsAlmost(2) && matrix[1, 1].IsAlmost(2)
+            && matrix[2, 0].IsAlmost(2) && matrix[2, 1].IsAlmost(2)
+            && matrix[3, 0].IsAlmost(2) && matrix[3, 1].IsAlmost(2)
+            && matrix[4, 0].IsAlmost(2) && matrix[4, 1].IsAlmost(2));
+        }
+      } catch { Assert.Fail("Layouting with fruchterman-reingold using pre-initialized coordinates failed."); }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs	(revision 14244)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs	(revision 14244)
@@ -0,0 +1,128 @@
+﻿#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
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphWrappersGraphTest {
+    [TestMethod]
+    public void IGraphWrappersGraphConstructionAndFinalization() {
+      var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      });
+      Assert.AreEqual(5, graph.Vertices);
+      Assert.IsFalse(graph.IsDirected);
+
+      graph = new Graph(3, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+      }, directed: true);
+      Assert.AreEqual(3, graph.Vertices);
+      Assert.IsTrue(graph.IsDirected);
+    }
+
+    [TestMethod]
+    public void TestDensity() {
+      var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      });
+
+      var density = graph.Density();
+      // in un-directed graphs edges count twice
+      Assert.IsTrue(density.IsAlmost(12 / 20.0));
+
+      graph.Dispose();
+
+      graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      }, directed: true);
+
+      density = graph.Density();
+      // in directed graphs edges count twice
+      Assert.IsTrue(density.IsAlmost(6 / 20.0));
+    }
+
+    [TestMethod]
+    public void TestPageRank() {
+      var graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 0),
+        Tuple.Create(3, 2),
+      }, directed: true);
+      var ranks = graph.PageRank();
+      Assert.AreEqual(4, ranks.Length);
+      Assert.AreEqual(0.372, ranks[0], 0.01);
+      Assert.AreEqual(0.195, ranks[1], 0.01);
+      Assert.AreEqual(0.394, ranks[2], 0.01);
+      Assert.AreEqual(0.037, ranks[3], 0.01);
+
+      graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(3, 0),
+      }, directed: true);
+      ranks = graph.PageRank();
+      Assert.AreEqual(4, ranks.Length);
+      Assert.AreEqual(0.250, ranks[0], 0.01);
+      Assert.AreEqual(0.250, ranks[1], 0.01);
+      Assert.AreEqual(0.250, ranks[2], 0.01);
+      Assert.AreEqual(0.250, ranks[3], 0.01);
+
+      graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(0, 3),
+        Tuple.Create(1, 0),
+        Tuple.Create(2, 0),
+        Tuple.Create(3, 0),
+      }, directed: true);
+      ranks = graph.PageRank();
+      Assert.AreEqual(4, ranks.Length);
+      Assert.AreEqual(0.480, ranks[0], 0.01);
+      Assert.AreEqual(0.173, ranks[1], 0.01);
+      Assert.AreEqual(0.173, ranks[2], 0.01);
+      Assert.AreEqual(0.173, ranks[3], 0.01);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs	(revision 14244)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs	(revision 14244)
@@ -0,0 +1,64 @@
+﻿#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
+
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphWrappersMatrixTest {
+    [TestMethod]
+    public void IGraphWrappersMatrixConstructionAndFinalization() {
+      var matrix = new Matrix(3, 2);
+      Assert.AreEqual(3, matrix.Rows);
+      Assert.AreEqual(2, matrix.Columns);
+      Assert.AreEqual(0, matrix[0, 0]);
+      matrix[0, 0] = 4;
+      var other = new Matrix(matrix);
+      Assert.AreEqual(3, other.Rows);
+      Assert.AreEqual(2, other.Columns);
+      Assert.AreEqual(4, other[0, 0]);
+    }
+
+    [TestMethod]
+    public void IGraphWrappersMatrixGetSetTest() {
+      var matrix = new Matrix(3, 2);
+      matrix[0, 0] = matrix[0, 1] = 4;
+      matrix[1, 0] = 3;
+      matrix[1, 1] = 2;
+      matrix[2, 0] = 1.5;
+      matrix[2, 1] = -0.5;
+      Assert.AreEqual(4, matrix[0, 0]);
+      Assert.AreEqual(4, matrix[0, 1]);
+      Assert.AreEqual(3, matrix[1, 0]);
+      Assert.AreEqual(2, matrix[1, 1]);
+      Assert.AreEqual(1.5, matrix[2, 0]);
+      Assert.AreEqual(-0.5, matrix[2, 1]);
+
+      var netmat = matrix.ToMatrix();
+      Assert.AreEqual(3, netmat.GetLength(0));
+      Assert.AreEqual(2, netmat.GetLength(1));
+      for (var i = 0; i < netmat.GetLength(0); i++)
+        for (var j = 0; j < netmat.GetLength(1); j++)
+          Assert.AreEqual(matrix[i, j], netmat[i, j]);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs	(revision 14244)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs	(revision 14244)
@@ -0,0 +1,58 @@
+﻿#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
+
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphWrappersVectorTest {
+    [TestMethod]
+    public void IGraphWrappersVectorConstructionAndFinalization() {
+      var vector = new Vector(7);
+      Assert.AreEqual(7, vector.Length);
+      Assert.AreEqual(0, vector[0]);
+      vector[0] = 4;
+      var other = new Vector(vector);
+      Assert.AreEqual(7, other.Length);
+      Assert.AreEqual(4, other[0]);
+    }
+
+    [TestMethod]
+    public void IGraphWrappersVectorGetSetTest() {
+      var vector = new Vector(5);
+      vector[0] = vector[1] = 4;
+      vector[2] = 3;
+      vector[3] = 1.5;
+      vector[4] = -0.5;
+      Assert.AreEqual(4, vector[0]);
+      Assert.AreEqual(4, vector[1]);
+      Assert.AreEqual(3, vector[2]);
+      Assert.AreEqual(1.5, vector[3]);
+      Assert.AreEqual(-0.5, vector[4]);
+
+      var netmat = vector.ToArray();
+      Assert.AreEqual(5, netmat.Length);
+      for (var i = 0; i < netmat.Length; i++)
+        Assert.AreEqual(vector[i], netmat[i]);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14209)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14244)
@@ -218,4 +218,8 @@
       <HintPath>..\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
       <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.igraph-0.8.0-pre, Version=0.8.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.igraph-0.8.0-pre.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.MainForm-3.3">
@@ -561,4 +565,8 @@
     <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\SubtreeCrossoverTest.cs" />
     <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\Util.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphWrappersGraphTest.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphLayoutTest.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphWrappersVectorTest.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphWrappersMatrixTest.cs" />
     <Compile Include="HeuristicLab.Persistence-3.3\StorableAttributeTests.cs" />
     <Compile Include="HeuristicLab.Persistence-3.3\UseCases.cs" />
@@ -679,4 +687,5 @@
     </EmbeddedResource>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
