Throw in the towel.
This release includes a lot of XML documentation updates. Also, due to https://github.com/dotnet/roslyn/issues/49568, I am forced to make the XML documentation members
public
instead ofinternal
for the time being.
This release includes a lot of nullable reference syntax updates.
New Features:
TryToRomanNumeral
Bag
data structure (work in progress... likely to change in near future)
Bug Fixes:
Changes:
ToCompareResult
converted to an extension method on int
ArrayJagged<T>
removed This was a legacy type that I wanted to remove for a while and just got around to it. If I add it back in Towel in the future, it will have a different design with more modularity.
TryParse
methods on measurement types changed from bool TryParse(string, out MEASUREMENT)
to (bool, MEASUREMENT?) TryParse(string)
Towel.Mathematics.Symbolics
Towel.Measurements.Measurement
Bug Fixes:
Towel.Mathematics.Symbolics.Parse<T>(...)
bug fix while parsing operations such as "squareroot(5)"
RedBlackTreeLinked<T, TCompare>.GetEnumerator()
fixed bug when tree is emptyChanges:
Compare<TSift>(...)
to CompareSift<TSift>(...)
on both ISortedBinaryTree<T>
to avoid naming collisionsContains<TSift>(...)
to ContainsSift<TSift>(...)
on both ISortedBinaryTree<T>
to avoid naming collisionsTryRemove<TSift>(...)
to TryRemoveSift<TSift>(...)
on both ISortedBinaryTree<T>
to avoid naming collisionsIAddable<T>
method bool TryAdd(T, out Exception)
to (bool, Exception?) TryAdd(T)
IRemovable<T>
method bool TryRemove(T, out Exception)
to (bool, Exception?) TryRemove(T)
StepperRef
and StepperRefBreak
methods
IFunc<T, (T, StepStatus)>
than a custom method signature with ref
parameters. I will likely add new methods called Mutate
as a replacement in the future, but for now I just removed them. Here is a benchmark that influenced this descision: https://github.com/asc-community/dotnet-benchmarks/tree/master/Benchmarks/IterationRefParametersVsReturns.T[] ToArray()
to IDataStructure<T>
(mainly for inheritdoc
)ICloneable<T>
(mainly for inheritdoc
)
Bound<T>
Exists
and Value
gettersBug Fixes:
Changes:
ReplaceCached
[method] removed (was a stupid idea...)
Note This is the first non-preview release of the Towel package on nuget.org.
New Features:
GetEnumerator
extension methods for Tuple<...>
, ValueTyple<...>
, and ITuple
Changes:
TryParseRomanNumeral
parameter string
->ReadOnlySpan<char>
Extensions.IsDefined
generic contraints where T : Enum
=> where TEnum : struct, Enum
ActionRuntime<...>
to SAction<...>
.Do(...)
to .Invoke(...)
FuncRuntime<...>
to SFunc<...>
.Do(...)
to .Invoke(...)
New Features:
HeapArray<T, TCompare>
->MinimumCapacity
[property] added setterBug Fixes:
Console.IntMenu
fixed bug where a hard coded value was used instead of the invalidMessage
parameterHeapArray<T, TCompare>
added exception checks for invalid minimum capacity valuesChanges:
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<TStep>(TStep step = default)
[method] addedISortedBinaryTree<T>
[interface] addedIAvlTree<T>
[interface] addedAvlTreeLinked<T>
[class] removed converted to static factory methods
IRedBlackTree<T>
[interface] addedRedBlackTreeLinked<T>
[class] removed converted to static factory methods
TreeMap<T>
->TreeMap<T, TEquate, THash>
[class] generic arguments changedHeapArray<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 changedMapHashLinked<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 changedIHashing<T>
->IHashing<T, THash>
[interface] generic arguments changedGraphSetOmnitree<T>
->GraphSetOmnitree<T, TEquate, THash>
[class] generic arguments changed
TCompare
generic argument will be added in a future version when the Omnitree rewrite is completeGraphWeightedMap<V, W>
->GraphWeightedMap<V, W, TEquate, THash>
[class] generic arguments changedIn 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 dovar 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.
New Features:
CombineRanges
simplifies sequences of ranges by combining ranges without gapsGraphWeightedMap
data structure that includes weights on the edgesMap
IEnumerable<K> GetKeys()
IEnumerable<(T Value, K Key)> GetPairs()
Stepper
, Keys
and Pairs
to support struct generic parametersBug Fixes:
OmnitreeBoundsLinked<T, Axis1...>
->Stepper(step + subspace)
bug fixChanges:
T Minimum
method was split into three methods like the maximum method was changed previously.
(int Index, T Value) Minimum
T MinimumValue
int MinimumIndex
Map
->void Stepper(Action<(T Value, K Key)> step)
renamed to Pairs
Map
->StepStatus Stepper(Func<(T Value, K Key), StepStatus> step)
renamed to PairsBreak
Map
->void Stepper(Action<K> step)
renamed to Keys
Map
->StepStatus Stepper(Func<K, StepStatus> step)
renamed to KeysBreak
Graph
->void Stepper(Action<(T?, T?)> step)
renamed to Edges
Graph
->StepStatus Stepper(Func<(T, T), StepStatus> step)
renamed to EdgesBreak
New Features:
GetXmlName
(was coupled with GetDocumentation
, but now it is exposed on it's own)
FieldInfo
PropertyInfo
EventInfo
ConstructorInfo
MethodInfo
Type
GetLeast
GetGreatest
Bug Fixes:
CommandLine.HandleArguments
: fixed minor bug where it was allowing parameters with single -
characters rather than twoQueueArray<T>.Newest
: needed a - 1
on the indexQueueArray<T>[int index]
: logic operators were wrong on min/max indicesNew Features:
Combinations
IsReorderOf
MapHashLinked<...>.AddOrUpdate
MapHashLinked<...>.TryUpdate
Bug Fixes:
QueueArray.MinimumCapacity
bug fixChanges:
_Compare
generic parameter on some appropriate data structures (ex Heap, AVL Tree, and Red Black Tree)implicit
casting operators from UniversalQuantification
to Span
/Memory
typesNote: there will be similar changes to other data structure interfaces in future releasese