This .NET library offers useful extension methods to collections and specific types.
ArgMaxValue
andArgMinValue
: Implementations of the known mathematics functions. They extend a collection of indices of value typeI
and take a functionFunc<I, V>
mapping indices to valuesV
, which must be comparable, i.e. implementingIComparable<V>
. They returnI?
which is null if the collection is empty or the index where the value becomes maximum or minimum respectively.ArgMax
andArgMin
: Same as above, except that typeI
is a reference type, thus the methods no longer need to returnI?
, they returnI
instead.RandomPickSequence
: These overloads create an infinite collection from an array by picking elements randomly.CycleSequence
: Creates an infinite collection by looping an array.
Squared
: It squares the number.Powered
: It raises the number to a power.
ComputePortableHashCode
: Computes a string hash code which is guaranteed to be stable across AppDomain's, .NET framework versions and 32 or 64 bits flavors.
This library has no dependencies.