Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Datatypes.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Datatypes.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Datatypes.cs	(revision 14247)
@@ -128,4 +128,12 @@
   #endregion
 
+  #region Delegates
+  [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
+  internal delegate bool igraph_bfshandler_t(igraph_t graph, int vid, int pred, int succ, int rank, int dist, IntPtr extra);
+
+  [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
+  internal delegate bool igraph_dfshandler_t(igraph_t graph, int vid, int dist, IntPtr extra);
+  #endregion
+
   #region Enums
   internal enum igraph_layout_grid_t {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/DllImporter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/DllImporter.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/DllImporter.cs	(revision 14247)
@@ -21,4 +21,5 @@
 
 using System;
+using System.IO;
 using System.Runtime.InteropServices;
 
@@ -29,6 +30,12 @@
     private readonly static bool X86 = false;
 
+    [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
+    private static extern bool SetDllDirectory(string lpPathName);
+
     static DllImporter() {
       X86 = !Environment.Is64BitProcess;
+      // Possible workaround as the builder doesn't execute the tests within the bin directory
+      if (Directory.Exists(Path.Combine(Environment.CurrentDirectory, "bin")))
+        SetDllDirectory(Path.Combine(Environment.CurrentDirectory, "bin"));
     }
 
@@ -109,4 +116,13 @@
     internal static int igraph_add_edge(igraph_t graph, int from, int to) {
       return X86 ? igraph_add_edge_x86(graph, from, to) : igraph_add_edge_x64(graph, from, to);
+    }
+    #endregion
+
+    #region igraph visits
+    internal static int igraph_bfs(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, igraph_vector_t order, igraph_vector_t rank, igraph_vector_t father, igraph_vector_t pred, igraph_vector_t succ, igraph_vector_t dist, igraph_bfshandler_t callback, object tag) {
+      return MarshalIfExistsAndCall(tag, ptr => X86 ? igraph_bfs_x86(graph, root, roots, mode, unreachable, restricted, order, rank, father, pred, succ, dist, callback, ptr) : igraph_bfs_x64(graph, root, roots, mode, unreachable, restricted, order, rank, father, pred, succ, dist, callback, ptr));
+    }
+    internal static int igraph_dfs(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, igraph_vector_t order, igraph_vector_t order_out, igraph_vector_t father, igraph_vector_t dist, igraph_dfshandler_t inWrapper, igraph_dfshandler_t outWrapper, object tag) {
+      return MarshalIfExistsAndCall(tag, ptr => X86 ? igraph_dfs_x86(graph, root, mode, unreachable, order, order_out, father, dist, inWrapper, outWrapper, ptr) : igraph_dfs_x64(graph, root, mode, unreachable, order, order_out, father, dist, inWrapper, outWrapper, ptr));
     }
     #endregion
@@ -137,4 +153,12 @@
     [DllImport(X64Dll, EntryPoint = "igraph_pagerank", CallingConvention = CallingConvention.Cdecl)]
     private static extern int igraph_pagerank_x64(igraph_t graph, igraph_pagerank_algo_t algo, [In, Out]igraph_vector_t vector, ref double value, igraph_vs_t vids, bool directed, double damping, igraph_vector_t weights, IntPtr options);
+    [DllImport(X86Dll, EntryPoint = "igraph_bfs", CallingConvention = CallingConvention.Cdecl)]
+    private static extern int igraph_bfs_x86(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t rank, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t pred, [In, Out]igraph_vector_t succ, [In, Out]igraph_vector_t dist, igraph_bfshandler_t callback, IntPtr extra);
+    [DllImport(X64Dll, EntryPoint = "igraph_bfs", CallingConvention = CallingConvention.Cdecl)]
+    private static extern int igraph_bfs_x64(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t rank, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t pred, [In, Out]igraph_vector_t succ, [In, Out]igraph_vector_t dist, igraph_bfshandler_t callback, IntPtr extra);
+    [DllImport(X86Dll, EntryPoint = "igraph_dfs", CallingConvention = CallingConvention.Cdecl)]
+    private static extern int igraph_dfs_x86(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t order_out, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t dist, igraph_dfshandler_t in_callback, igraph_dfshandler_t out_callback, IntPtr extra);
+    [DllImport(X64Dll, EntryPoint = "igraph_dfs", CallingConvention = CallingConvention.Cdecl)]
+    private static extern int igraph_dfs_x64(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, [In, Out]igraph_vector_t order, [In, Out]igraph_vector_t order_out, [In, Out]igraph_vector_t father, [In, Out]igraph_vector_t dist, igraph_dfshandler_t in_callback, igraph_dfshandler_t out_callback, IntPtr extra);
     #endregion
     #endregion
@@ -348,13 +372,5 @@
     }
     internal static int igraph_layout_mds(igraph_t graph, igraph_matrix_t res, igraph_matrix_t dist = null, int dim = 2) {
-      var arpackoptions = GetDefaultArpackOptions();
-      var options = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(igraph_arpack_options_t)));
-      Marshal.StructureToPtr(arpackoptions, options, false);
-      try {
-        return X86 ? igraph_layout_mds_x86(graph, res, dist, dim, options) : igraph_layout_mds_x64(graph, res, dist, dim, options);
-      } finally {
-        Marshal.DestroyStructure(options, typeof(igraph_arpack_options_t));
-        Marshal.FreeHGlobal(options);
-      }
+      return MarshalIfExistsAndCall(GetDefaultArpackOptions(), ptr => X86 ? igraph_layout_mds_x86(graph, res, dist, dim, ptr) : igraph_layout_mds_x64(graph, res, dist, dim, ptr));
     }
 
@@ -399,4 +415,40 @@
     #endregion
     #endregion
+
+    private static int MarshalIfExistsAndCall(object o, Func<IntPtr, int> call) {
+      var ptr = IntPtr.Zero;
+      if (o != null) {
+        try {
+          ptr = Marshal.AllocHGlobal(Marshal.SizeOf(o));
+        } catch (OutOfMemoryException e) { throw new InvalidOperationException("Not enough memory to perform operation.", e); }
+        Marshal.StructureToPtr(o, ptr, false);
+      }
+      try {
+        return call(ptr);
+      } finally {
+        if (o != null) {
+          Marshal.DestroyStructure(ptr, o.GetType());
+          Marshal.FreeHGlobal(ptr);
+        }
+      }
+    }
+
+    private static void MarshalIfExistsAndCall(object o, Action<IntPtr> call) {
+      var ptr = IntPtr.Zero;
+      if (o != null) {
+        try {
+          ptr = Marshal.AllocHGlobal(Marshal.SizeOf(o));
+        } catch (OutOfMemoryException e) { throw new InvalidOperationException("Not enough memory to perform operation.", e); }
+        Marshal.StructureToPtr(o, ptr, false);
+      }
+      try {
+        call(ptr);
+      } finally {
+        if (o != null) {
+          Marshal.DestroyStructure(ptr, o.GetType());
+          Marshal.FreeHGlobal(ptr);
+        }
+      }
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/HeuristicLab.igraph-0.8.0-pre.csproj
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/HeuristicLab.igraph-0.8.0-pre.csproj	(revision 14246)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/HeuristicLab.igraph-0.8.0-pre.csproj	(revision 14247)
@@ -49,4 +49,5 @@
   <ItemGroup>
     <Compile Include="DllImporter.cs" />
+    <Compile Include="Wrappers\Datatypes.cs" />
     <Compile Include="Wrappers\Graph.cs" />
     <Compile Include="Wrappers\Matrix.cs" />
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Datatypes.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Datatypes.cs	(revision 14247)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Datatypes.cs	(revision 14247)
@@ -0,0 +1,31 @@
+﻿#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.IGraph.Wrappers {
+  public delegate bool BreadthFirstHandler(Graph g, int currentVertexId, int previousVertexId, int nextVertexId, int rank, int distance, object tag);
+  public delegate bool DepthFirstHandler(Graph g, int vertexId, int distance, object tag);
+
+  public enum DirectedWalkMode {
+    Outgoing = 1,
+    Incoming = 2,
+    All = 3,
+  }
+}
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Graph.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Graph.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Igraph/0.8.0-pre/HeuristicLab.Igraph-0.8.0-pre/Wrappers/Graph.cs	(revision 14247)
@@ -132,4 +132,15 @@
       return coords;
     }
+
+    public void BreadthFirstWalk(BreadthFirstHandler handler, int root, DirectedWalkMode mode, bool includeUnreachableFromRoot = false, object tag = null) {
+      igraph_bfshandler_t wrapper = (t, vid, pred, succ, rank, dist, extra) => handler != null && handler(this, vid, pred, succ, rank, dist, tag);
+      DllImporter.igraph_bfs(graph, root, null, (igraph_neimode_t)mode, includeUnreachableFromRoot, null, null, null, null, null, null, null, wrapper, tag);
+    }
+
+    public void DepthFirstWalk(DepthFirstHandler inHandler, DepthFirstHandler outHandler, int root, DirectedWalkMode mode, bool includeUnreachableFromRoot = false, object tag = null) {
+      igraph_dfshandler_t inWrapper = (t, vid, dist, extra) => inHandler != null && inHandler(this, vid, dist, tag);
+      igraph_dfshandler_t outWrapper = (t, vid, dist, extra) => outHandler != null && outHandler(this, vid, dist, tag);
+      DllImporter.igraph_dfs(graph, root, (igraph_neimode_t)mode, includeUnreachableFromRoot, null, null, null, null, inWrapper, outWrapper, tag);
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Tests/Builder.testsettings
===================================================================
--- /trunk/sources/HeuristicLab.Tests/Builder.testsettings	(revision 14246)
+++ /trunk/sources/HeuristicLab.Tests/Builder.testsettings	(revision 14247)
@@ -3,7 +3,5 @@
   <Description>Test settings to run unit tests on the HL build server.</Description>
   <Deployment>
-    <DeploymentItem filename="bin\igraph-0.8.0-pre-x64.dll" />
     <DeploymentItem filename="bin\" />
-    <DeploymentItem filename="bin\igraph-0.8.0-pre-x86.dll" />
   </Deployment>
   <Execution hostProcessPlatform="MSIL">
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs	(revision 14247)
@@ -32,5 +32,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void FruchtermanReingoldLayoutTest() {
+    public void IGraphWrappersLayoutFruchtermanReingoldTest() {
       var graph = new Graph(5, new[] {
         Tuple.Create(0, 1),
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs	(revision 14247)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Common;
 using HeuristicLab.IGraph.Wrappers;
@@ -27,4 +28,6 @@
 namespace HeuristicLab.Tests {
   [TestClass]
+  [DeploymentItem("igraph-0.8.0-pre-x86.dll")]
+  [DeploymentItem("igraph-0.8.0-pre-x64.dll")]
   public class IGraphWrappersGraphTest {
     [TestMethod]
@@ -32,5 +35,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void IGraphWrappersGraphConstructionAndFinalization() {
+    public void IGraphWrappersGraphConstructionAndFinalizationTest() {
       var graph = new Graph(5, new[] {
         Tuple.Create(0, 1),
@@ -57,5 +60,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void TestDensity() {
+    public void IGraphWrappersGraphDensityTest() {
       var graph = new Graph(5, new[] {
         Tuple.Create(0, 1),
@@ -91,5 +94,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void TestPageRank() {
+    public void IGraphWrappersGraphPageRankTest() {
       var graph = new Graph(4, new[] {
         Tuple.Create(0, 1),
@@ -134,4 +137,54 @@
       Assert.AreEqual(0.173, ranks[3], 0.01);
     }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphBreadthFirstWalkTest() {
+      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 visited = new HashSet<int>();
+      BreadthFirstHandler handler = (graph1, currentVertexId, previousVertexId, nextVertexId, rank, distance, tag) => {
+        visited.Add(currentVertexId);
+        return false;
+      };
+      graph.BreadthFirstWalk(handler, 0, DirectedWalkMode.All, true, null);
+      Assert.AreEqual(4, visited.Count);
+      Assert.IsTrue(visited.Contains(0));
+      Assert.IsTrue(visited.Contains(1));
+      Assert.IsTrue(visited.Contains(2));
+      Assert.IsTrue(visited.Contains(3));
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphDepthFirstWalkTest() {
+      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 visited = new HashSet<int>();
+      DepthFirstHandler handler = (graph1, vertexId, distance, tag) => {
+        visited.Add(vertexId);
+        return false;
+      };
+      graph.DepthFirstWalk(handler, handler, 0, DirectedWalkMode.All, true, null);
+      Assert.AreEqual(4, visited.Count);
+      Assert.IsTrue(visited.Contains(0));
+      Assert.IsTrue(visited.Contains(1));
+      Assert.IsTrue(visited.Contains(2));
+      Assert.IsTrue(visited.Contains(3));
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs	(revision 14247)
@@ -30,5 +30,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void IGraphWrappersMatrixConstructionAndFinalization() {
+    public void IGraphWrappersMatrixConstructionAndFinalizationTest() {
       var matrix = new Matrix(3, 2);
       Assert.AreEqual(3, matrix.Rows);
@@ -86,5 +86,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void IGraphWrappersMatrixFill() {
+    public void IGraphWrappersMatrixFillTest() {
       var matrix = new Matrix(3, 2);
       matrix.Fill(2.6);
@@ -101,5 +101,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void IGraphWrappersMatrixTranspose() {
+    public void IGraphWrappersMatrixTransposeTest() {
       var matrix = new Matrix(3, 2);
       matrix.Transpose();
@@ -112,5 +112,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void IGraphWrappersMatrixScale() {
+    public void IGraphWrappersMatrixScaleTest() {
       var matrix = new Matrix(3, 2);
       matrix[0, 0] = matrix[0, 1] = 4;
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs	(revision 14246)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs	(revision 14247)
@@ -31,5 +31,5 @@
     [TestCategory("igraph")]
     [TestProperty("Time", "short")]
-    public void IGraphWrappersVectorConstructionAndFinalization() {
+    public void IGraphWrappersVectorConstructionAndFinalizationTest() {
       var vector = new Vector(7);
       Assert.AreEqual(7, vector.Length);
