Arborescence.Traversal 0.17.0

dotnet add package Arborescence.Traversal --version 0.17.0
NuGet\Install-Package Arborescence.Traversal -Version 0.17.0
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.17.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Arborescence.Traversal --version 0.17.0
#r "nuget: Arborescence.Traversal, 0.17.0"
#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.17.0

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

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[^SB].

Basic usage

Let's consider this implicit adjacency graph[^IG]:

public readonly record struct Node(int Value);

public sealed class AdjacencyGraph : IOutNeighborsAdjacency<Node, IEnumerator<Node>>
{
    public IEnumerator<Node> EnumerateOutNeighbors(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);

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

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

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 was computed. 
.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 403 1/11/2024
0.16.5 330 1/7/2024
0.16.4 384 1/2/2024
0.16.3 356 1/1/2024
0.16.2 433 7/28/2023
0.16.0 374 6/4/2023
0.15.3 473 2/9/2023
0.15.2 505 1/25/2023
0.15.1 663 1/18/2023
0.15.0 489 1/17/2023
0.14.0 518 1/7/2023
0.13.0 631 6/27/2021
0.12.0 547 6/9/2021
0.11.0 661 5/30/2021
0.10.0 606 5/29/2021
0.9.0 633 1/15/2021
0.8.1 653 1/8/2021
0.8.0 618 1/6/2021
0.7.1 695 12/26/2020
0.7.0 770 12/25/2020
0.6.0 707 11/9/2020
0.5.0 702 11/2/2020
0.3.2 686 9/6/2020
0.1.1 722 7/13/2020