Xyaneon.ComputerScience.VanEmdeBoasTrees 1.0.0

.NET Standard 2.0
dotnet add package Xyaneon.ComputerScience.VanEmdeBoasTrees --version 1.0.0
NuGet\Install-Package Xyaneon.ComputerScience.VanEmdeBoasTrees -Version 1.0.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="Xyaneon.ComputerScience.VanEmdeBoasTrees" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xyaneon.ComputerScience.VanEmdeBoasTrees --version 1.0.0
#r "nuget: Xyaneon.ComputerScience.VanEmdeBoasTrees, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Xyaneon.ComputerScience.VanEmdeBoasTrees as a Cake Addin
#addin nuget:?package=Xyaneon.ComputerScience.VanEmdeBoasTrees&version=1.0.0

// Install Xyaneon.ComputerScience.VanEmdeBoasTrees as a Cake Tool
#tool nuget:?package=Xyaneon.ComputerScience.VanEmdeBoasTrees&version=1.0.0

Xyaneon.ComputerScience.VanEmdeBoasTrees

NuGet Build Status

A .NET Standard library which provides a van Emde Boas tree implementation for educational purposes.

Usage

Constructing a tree

Once you have the library added to your solution, you can create a van Emde Boas tree using code like the following:

using Xyaneon.ComputerScience.VanEmdeBoasTrees;

// Snip...

var tree = new VanEmdeBoasTree(universe); // universe must be an int that is a power of two.

Besides being a value of two, note that the universe value you supply must also be larger than the maximum value you plan on storing in the tree.

An alternate constructor is available if you also want to supply the values to store in the tree right away:

IEnumerable<int> yourValues = new List<int>({ 1, 2, 3 });

var tree = new vanEmdeBoasTree(4, yourValues);

Tree operations

The VanEmdeBoasTree class implements the IVanEmdeBoasTree interface. Through this interface, you have access to the following standard van Emde Boas tree operations via its methods and properties:

  • Maximum
  • Minimum
  • Delete
  • Insert
  • Member
  • Predecessor
  • Successor

The maximum and minimum can be obtained in O(1) time; all the other operations take O(lg lg n) time, which is a property of the van Emde Boas tree itself.

You can easily implement your own version of a van Emde Boas tree which implements the provided IVanEmdeBoasTree interface, then compare its results against those of the provided VanEmdeBoasTree class to check its correctness using the exact same method calls.

All public code in this library is documented using XML documentation comments, which you can refer to for further usage information. These comments should also be available to you through IntelliSense or the Visual Studio Object Browser.

Solution structure

This Visual Studio 2017 solution contains two projects.

Xyaneon.ComputerScience.VanEmdeBoasTrees

A .NET Standard 2.0 library which provides an implementation of van Emde Boas trees.

Xyaneon.ComputerScience.VanEmdeBoasTrees.Test

A .NET Core 2.1 unit testing project for Xyaneon.ComputerScience.VanEmdeBoasTrees using the MSTest unit testing framework.

License

This library is free and open-source software provided under the MIT license. See the LICENSE.txt file for additional information.

Additional information

The van Emde Boas tree implementation provided is based on the pseudocode presented in the "Introduction to Algorithm Design" (CLRS) book.

This library is primarily intended for educational purposes on how van Emde Boas trees work. It may be possible to create a more performant version of the code for use in actual applications; this is left as an exercise to the reader.

References

  • Wikipedia article on van Emde Boas trees
  • "Introduction to Algorithm Design" 3<sup>rd</sup> edition, by Thomas Cormen et al. ISBN: 978-0-262-03384-8. Available here from MIT Press. See chapter 20 for information specifically on van Emde Boas trees.
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.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.

Version Downloads Last updated
1.0.0 689 11/6/2018

v1.0.0 - 2018-11-05
- Initial release.