Skip to content

v1.0.26-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@ZacharyPatten ZacharyPatten released this 07 Jun 04:32

Nuget Package

New Features:

  • HeapArray<T, TCompare>->MinimumCapacity [property] added setter

Bug Fixes:

  • Console.IntMenu fixed bug where a hard coded value was used instead of the invalidMessage parameter
  • HeapArray<T, TCompare> added exception checks for invalid minimum capacity values

Changes:

  • many Towel.DataStructures namespace interfaces, types, and methods were redesigned
    • IDataStructure<T>->void Stepper(Action<T> step) [method] removed handled via extension methods
    • IDataStructure<T>->StepStatus Stepper(Func<T, StepStatus> step) [method] removed handled via extension methods
    • IDataStructure<T>->StepStatus StepperBreak&lt;TStep&gt;(TStep step = default) [method] added
    • ISortedBinaryTree<T> [interface] added
    • IAvlTree<T> [interface] added
    • AvlTreeLinked<T> [class] removed converted to static factory methods
    • IRedBlackTree<T> [interface] added
    • RedBlackTreeLinked<T> [class] removed converted to static factory methods
    • TreeMap<T>->TreeMap<T, TEquate, THash> [class] generic arguments changed
    • HeapArray<T> [class] removed converted to static factory methods
    • SetHashLinked<T> [class] removed converted to static factory methods
    • GraphMap<T>->GraphMap<T, TEquate, THash> [class] generic arguments changed
    • MapHashLinked<T, K> [class] removed converted to static factory methods
    • DataStructure.IEquating<K> removed from interface IMap<T, K> [interface]
    • IEquating<T>->IEquating<T, TEquate> [interface] generic arguments changed
    • IHashing<T>->IHashing<T, THash> [interface] generic arguments changed
    • GraphSetOmnitree<T>->GraphSetOmnitree<T, TEquate, THash> [class] generic arguments changed
      • Note: a TCompare generic argument will be added in a future version when the Omnitree rewrite is complete
    • GraphWeightedMap<V, W>->GraphWeightedMap<V, W, TEquate, THash> [class] generic arguments changed

In place of types with reduced generic parameters, "New" static factory methods were added for data structures with functional generic parameters. For example, instead of var tree = new AvlTreeLinked<T>(); you now do var tree = AvlTreeLinked.New<T>();. Static factory methods are more modular that creating custom types for purposes of defaulting generic parameters.

Multiple methods not listed above were converted to "TryXxx" patterns for better versatility and exception handling.