MoreComplexDataStructures 1.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MoreComplexDataStructures --version 1.5.0
NuGet\Install-Package MoreComplexDataStructures -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="MoreComplexDataStructures" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MoreComplexDataStructures --version 1.5.0
#r "nuget: MoreComplexDataStructures, 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.
// Install MoreComplexDataStructures as a Cake Addin
#addin nuget:?package=MoreComplexDataStructures&version=1.5.0

// Install MoreComplexDataStructures as a Cake Tool
#tool nuget:?package=MoreComplexDataStructures&version=1.5.0

MoreComplexDataStructures is a class library containing a collection of data structures (plus related utility classes) more complex than those found in the standard .NET framework.

The project currently contains the following data structures and utility classes...

WeightBalancedTree - An implementation of a weight-balanced tree.  The tree maintains counts of the nodes in each node's subtrees, and implements basic self balancing by performing rotations on any nodes where the subtree sizes differ, and rotation would improve the balance.  The class implements several methods to traverse based on item value comparison (e.g. GetNextLessThan(), GetNextGreaterThan(), GetAllLessThan(), GetAllGreaterThan()), and executes GetCountLessThan() and GetCountGreaterThan() in O(log(n)) time (since these values are stored and maintained at each node).  The class also provides methods to perform pre, post, and in-order depth-first search, breadth-first search, and to return a random node item.

MinHeap / MaxHeap - Tree-based implementations of a min and max heap.  Insert() and ExtractMin() / ExtractMax() methods return with order O(log(n)) time complexity.  Also provides methods to traverse the nodes of the underlying trees via a breadth-first search.

LongIntegerStatusStorer - Stores a true/false status for a complete set of long (Int64) integers.  Uses an underlying tree holding ranges of integers to store the statuses.  Also provides a method TraverseTree() to traverse the ranges stored in the tree via a breadth-first search.  Designed to be more memory efficient than an equivalent boolean array when large sets of the Int64 key values are contiguous (and hence can be 'condensed' into a range), and to support ranges larger than Int32.MaxValue.

ListRandomizer - Randomizes a List or Array using the Fisher/Yates/Knuth algorithm (O(n) time complexity).

WeightedRandomGenerator - Returns items randomly based on configured weightings.  The underlying implementation uses a tree, so the Generate() method returns with order O(log(n)) time complexity (where n is the number of weightings defined).

Trie - An implementation of trie / prefix tree.  Nodes of the trie maintain a count of the number of sequences in each subtree, hence the GetCountOfSequencesWithPrefix() method returns a list of sequences with the specified prefix with order O(n) time complexity (where n is the number of elements in the prefix sequence).

FrequencyTable - A simple (Dictionary-based) frequency table, which stores the frequency of occurrence of objects.

BinarySearchTreeBalancedInserter - Inserts a set of items into a binary search tree, ensuring that the tree is balanced, and depth is minimized.

CharacterTrie - Effectively a Trie<Char>, but with special implementations of the Insert(), Delete(), and Contains() methods which accept String parameters (and avoid the overhead of having to call String.ToCharArray() as is required with a Trie<Char>).

LRUCache - A simple implementation of a least-recently-used cache using an underlying Dictionary and LinkedList.  By default the cache stores a fixed number of items (defined by constructor parameter 'itemLimit'), but it optionally allows overriding the routine to check whether the cache is full (e.g. to decide instead based on total memory usage, etc...).

UnflaggedNumberGenerator - Allows 'flagging' (i.e. setting true or false) for each number in a consecutive range (where the range length is <= Int64.MaxValue), and then provides methods to identify which numbers have not been flagged (GetLowestUnflaggedNumbers(), GetHighestUnflaggedNumbers(), etc...).

UniqueRandomGenerator - Generates unique Int64 random numbers within a given range (where the range length is <= Int64.MaxValue). The underlying implementation uses a balanced tree of integer ranges, so the Generate() method returns with order O(log(n)) time complexity.

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  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 tizen40 was computed.  tizen60 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.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on MoreComplexDataStructures:

Repository Stars
BG-IT-Edu/School-Programming
Хранилище за свободно учебно съдържание по програмиране, информатика и ИТ за българските училища в помощ на ИТ учителите
Version Downloads Last updated
1.9.1 4,996 3/29/2020
1.9.0 1,010 11/6/2019
1.8.0 1,010 9/16/2019
1.7.0 964 9/7/2019
1.6.0 982 7/27/2019
1.5.0 1,072 5/18/2019
1.4.0 1,583 2/10/2018
1.3.0 1,327 10/16/2017
1.2.0 1,371 8/26/2017
1.1.0 1,382 6/23/2017

Converted to .NET Standard.
Added LRUCache, CharacterTrie, UniqueRandomGenerator, UnflaggedNumberGenerator classes.
Implemented automatic balancing in WeightBalancedTree.
Added Min and Max properties to WeightBalancedTree.
Added method Get() to WeightBalancedTree to return a specified node item (useful when the node items are container classes which hold additional data to that used in the IComparable<T> implementation... i.e. allowing the tree to be used as a treemap).
Trie.GetAllSequencesWithPrefix() now returns IEnumerable<List<T>>.
Added an additional Trie constructor which returns the root node via an 'out' parameter (to allow custom traversals).
Added method FrequencyTable.Clear().
Refactored WeightedRandomGenerator to remove Dictionary member 'weightingToItemMap' and instead store data in ItemAndWeighting<T> as each tree node item.
Removed TreeBasedListRandomizer class.