DTree.Encoding 1.5.0

Suggested Alternatives

Triordinal.DTree

There is a newer version of this package available.
See the version list below for details.
dotnet add package DTree.Encoding --version 1.5.0
                    
NuGet\Install-Package DTree.Encoding -Version 1.5.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="DTree.Encoding" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DTree.Encoding" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="DTree.Encoding" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DTree.Encoding --version 1.5.0
                    
#r "nuget: DTree.Encoding, 1.5.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.
#:package DTree.Encoding@1.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DTree.Encoding&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=DTree.Encoding&version=1.5.0
                    
Install as a Cake Tool

DTree.Encoding

C# implementation of DTree, the incremental encoding of directed trees by two projections Q1 and Q2: node u reaches node v if and only if u precedes v in both. Reachability, including set queries, is answered in O(1) or O(log k) by comparing positions, and stays valid under insertions without recomputation, because the insertion points of a new node are known in advance.

dotnet add package DTree.Encoding
using DirectedTrees;

var t = new DTree("P1");
t.Insert("A", "B");
t.Insert("B", "C");
t.CanReach("A", "C");   // true
t.PathToRoot("C");      // ["C", "B", "A"]

// Node handles skip the lookup by name:
DNode a = t.GetNode("A"), c = t.GetNode("C");
t.CanReach(a, c);       // true, two position comparisons

// Set queries with constructed nodes:
t.Insert("A", "D");
t.VMin(new[] { "C", "D" }).ReachesAll("A");      // true
t.UMin(new[] { "B", "D" }).ReachedBySome("C");   // true
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.