Arborescence.Traversal 0.15.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Arborescence.Traversal --version 0.15.2
NuGet\Install-Package Arborescence.Traversal -Version 0.15.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Arborescence.Traversal" Version="0.15.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Arborescence.Traversal --version 0.15.2
#r "nuget: Arborescence.Traversal, 0.15.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Arborescence.Traversal as a Cake Addin
#addin nuget:?package=Arborescence.Traversal&version=0.15.2

// Install Arborescence.Traversal as a Cake Tool
#tool nuget:?package=Arborescence.Traversal&version=0.15.2

Traversal — Arborescence Graph Library

Arborescence.Traversal version

This package provides basic traversal algorithms for incidence and adjacency graphs:

  • generic search taking a frontier as a parameter,
  • breadth-first search (BFS), which is a special case of generic search with FIFO-queue as the frontier,
  • depth-first search (DFS), which is not a special case of generic search with LIFO-stack as the frontier [1].

Basic usage

Let's consider this implicit adjacency graph [2]:

public readonly record struct Node(int Value);

public sealed class AdjacencyGraph : IAdjacency<Node, IEnumerator<Node>>
{
    public IEnumerator<Node> EnumerateNeighbors(Node vertex) =>
        vertex.Value is < 0 or >= 10
            ? Enumerable.Empty<Node>().GetEnumerator()
            : EnumerateNeighborsIterator(vertex);

    private static IEnumerator<Node> EnumerateNeighborsIterator(
        Node vertex)
    {
        yield return new(vertex.Value >> 1);
        yield return new(vertex.Value << 1);
    }
}

This is how to traverse it in a breadth-first manner with an adjacency version of the algorithm:

AdjacencyGraph adjacencyGraph = new();
Node source = new(3);
IEnumerator<Node> vertexEnumerator =
    EnumerableBfs<Node>.EnumerateVertices(adjacencyGraph, source);
while (vertexEnumerator.MoveNext())
    Console.WriteLine(vertexEnumerator.Current);

[1] Stack-based graph traversal ≠ depth first search
https://11011110.github.io/blog/2013/12/17/stack-based-graph-traversal.html

[2] Implicit graph
https://en.wikipedia.org/wiki/Implicit_graph

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Arborescence.Traversal:

Package Downloads
Arborescence.Traversal.Specialized

Graph traversal algorithms specialized for integer vertices from a contiguous range. Commonly used types: • Adjacency.EnumerableBfs<TNeighborEnumerator> • Adjacency.EnumerableDfs<TNeighborEnumerator> • Adjacency.EnumerableGenericSearch<TNeighborEnumerator> • Adjacency.EagerBfs<TNeighborEnumerator> • Adjacency.EagerDfs<TNeighborEnumerator> • Incidence.EnumerableBfs<TEdge, TEdgeEnumerator> • Incidence.EnumerableDfs<TEdge, TEdgeEnumerator> • Incidence.EnumerableGenericSearch<TEdge, TEdgeEnumerator> • Incidence.EagerBfs<TEdge, TEdgeEnumerator> • Incidence.EagerDfs<TEdge, TEdgeEnumerator>

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.17.0 365 1/11/2024
0.16.5 316 1/7/2024
0.16.4 371 1/2/2024
0.16.3 343 1/1/2024
0.16.2 421 7/28/2023
0.16.0 363 6/4/2023
0.15.3 462 2/9/2023
0.15.2 492 1/25/2023
0.15.1 652 1/18/2023
0.15.0 479 1/17/2023
0.14.0 505 1/7/2023
0.13.0 622 6/27/2021
0.12.0 538 6/9/2021
0.11.0 651 5/30/2021
0.10.0 597 5/29/2021
0.9.0 623 1/15/2021
0.8.1 643 1/8/2021
0.8.0 609 1/6/2021
0.7.1 684 12/26/2020
0.7.0 760 12/25/2020
0.6.0 697 11/9/2020
0.5.0 692 11/2/2020
0.3.2 676 9/6/2020
0.1.1 709 7/13/2020