Show / Hide Table of Contents

Class Statics

Root type of the static functional methods in Towel.

Inheritance
System.Object
Statics
Namespace: Towel
Assembly: Towel.dll
Syntax
public static class Statics : object

Fields

| Improve this Doc View Source

Break

Stepper was broken.

Declaration
public const StepStatus Break = default(StepStatus)
Field Value
Type Description
StepStatus
| Improve this Doc View Source

Continue

Stepper was not broken.

Declaration
public const StepStatus Continue = default(StepStatus)
Field Value
Type Description
StepStatus
| Improve this Doc View Source

Default

The default case in a Switch statement (true).

Declaration
public const Statics.SwitchSyntax.Keyword Default = Statics.SwitchSyntax.Keyword.Default
Field Value
Type Description
Statics.SwitchSyntax.Keyword
| Improve this Doc View Source

Equal

The left operand is equal to the right operand.

Declaration
public const CompareResult Equal = default(CompareResult)
Field Value
Type Description
CompareResult
| Improve this Doc View Source

Goal

The Goal was found.

Declaration
public const Statics.GraphSearchStatus Goal = default(Statics.GraphSearchStatus)
Field Value
Type Description
Statics.GraphSearchStatus
| Improve this Doc View Source

Greater

The left operand is greater than the right operand.

Declaration
public const CompareResult Greater = default(CompareResult)
Field Value
Type Description
CompareResult
| Improve this Doc View Source

Less

The left operand is less than the right operand.

Declaration
public const CompareResult Less = default(CompareResult)
Field Value
Type Description
CompareResult
| Improve this Doc View Source

None

There is no bound.

Declaration
public const Omnitree.Keyword None = null
Field Value
Type Description
Omnitree.Keyword

Properties

| Improve this Doc View Source

Chance

Allows chance syntax with "using static Towel.Syntax;".

Declaration
public static Statics.ChanceSyntax Chance { get; }
Property Value
Type Description
Statics.ChanceSyntax
Examples

25% Chance

Methods

| Improve this Doc View Source

Ɐ<T>(T[])

Universal Quantification Operator.

Declaration
public static Statics.UniversalQuantification<T> Ɐ<T>(params T[] values)
Parameters
Type Name Description
T[] values

The values of the universal quantification.

Returns
Type Description
Statics.UniversalQuantification<T>

The declared universal quantification.

Type Parameters
Name Description
T

The element type of the universal quantification to declare.

| Improve this Doc View Source

AbsoluteValue<T>(T)

Gets the absolute value of a value.

Declaration
public static T AbsoluteValue<T>(T a)
Parameters
Type Name Description
T a

The value to get the absolute value of.

Returns
Type Description
T

The absolute value of the provided value.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Addition<T>(T, T)

Adds two values [a + b].

Declaration
public static T Addition<T>(T a, T b)
Parameters
Type Name Description
T a

The left operand.

T b

The right operand.

Returns
Type Description
T

The result of the addition [a + b].

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Addition<T>(T, T, T, T[])

Adds multiple values [a + b + c + ...].

Declaration
public static T Addition<T>(T a, T b, T c, params T[] d)
Parameters
Type Name Description
T a

The first operand of the addition.

T b

The second operand of the addition.

T c

The third operand of the addition.

T[] d

The remaining operands of the addition.

Returns
Type Description
T

The result of the addition [a + b + c + ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Addition<T>(Action<Action<T>>)

Adds multiple values [step1 + step2 + step3 + ...].

Declaration
public static T Addition<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper of the values to add.

Returns
Type Description
T

The result of the addition [step1 + step2 + step3 + ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Addition<TA, TB, TC>(TA, TB)

Adds two values [a + b].

Declaration
public static TC Addition<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the addition [a + b].

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

Any<T>(Action<Action<T>>, Predicate<T>)

Determines if the stepper contains any of the predicated values.

Declaration
public static bool Any<T>(this Action<Action<T>> stepper, Predicate<T> where)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper to determine if any predicated values exist.

Predicate<T> where

The predicate.

Returns
Type Description
System.Boolean

True if any of the predicated values exist or

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

Any<T>(Func<Func<T, StepStatus>, StepStatus>, Predicate<T>)

Determines if the stepper contains any of the predicated values.

Declaration
public static bool Any<T>(this Func<Func<T, StepStatus>, StepStatus> stepper, Predicate<T> where)
Parameters
Type Name Description
Func<Func<T, StepStatus>, StepStatus> stepper

The stepper to determine if any predicated values exist.

Predicate<T> where

The predicate.

Returns
Type Description
System.Boolean

True if any of the predicated values exist or

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

Any<T>(Span<T>, Func<T, Boolean>)

Determines if a span contains any predicated values.

Declaration
public static bool Any<T>(Span<T> span, Func<T, bool> predicate)
Parameters
Type Name Description
Span<T> span

The span to scan for predicated values in.

Func<T, System.Boolean> predicate

The predicate of the values.

Returns
Type Description
System.Boolean

True if a predicated was found.

Type Parameters
Name Description
T

The element type of the span.

| Improve this Doc View Source

Any<T, TPredicate>(Span<T>, TPredicate)

Determines if a span contains a value.

Declaration
public static bool Any<T, TPredicate>(Span<T> span, TPredicate predicate = default(TPredicate))
    where TPredicate : struct, IFunc<T, bool>
Parameters
Type Name Description
Span<T> span

The span to check for the value in.

TPredicate predicate

The value to look for.

Returns
Type Description
System.Boolean

True if a predicated was found.

Type Parameters
Name Description
T

The element type of the span.

TPredicate

The function for equating values.

| Improve this Doc View Source

Append<T>(Action<Action<T>>, T[])

Appends values to the stepper.

Declaration
public static Action<Action<T>> Append<T>(this Action<Action<T>> stepper, params T[] values)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper to append to.

T[] values

The values to append to the stepper.

Returns
Type Description
Action<Action<T>>

The resulting stepper with the appended values.

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

AppendLine(ref SpanBuilder<Char>)

Appends a to a spanBuilder.

Declaration
public static void AppendLine(this ref SpanBuilder<char> spanBuilder)
Parameters
Type Name Description
SpanBuilder<System.Char> spanBuilder

The SpanBuilder<T> to append to.

| Improve this Doc View Source

AppendLine(ref SpanBuilder<Char>, ReadOnlySpan<Char>)

Appends a span followed by to a spanBuilder.

Declaration
public static void AppendLine(this ref SpanBuilder<char> spanBuilder, ReadOnlySpan<char> span)
Parameters
Type Name Description
SpanBuilder<System.Char> spanBuilder

The SpanBuilder<T> to append to.

ReadOnlySpan<System.Char> span

The span to append to the spanBuilder.

| Improve this Doc View Source

AppendLine(ref SpanBuilder<Char>, Char)

Appends a followed by to a spanBuilder.

Declaration
public static void AppendLine(this ref SpanBuilder<char> spanBuilder, char value)
Parameters
Type Name Description
SpanBuilder<System.Char> spanBuilder

The SpanBuilder<T> to append to.

System.Char value

The to append to the spanBuilder.

| Improve this Doc View Source

AStarSearch<TNode, TNumeric>(IGraphWeighted<TNode, TNumeric>, TNode, TNode, Statics.SearchHeuristic<TNode, TNumeric>, out TNumeric)

Perfoms A* Search on the graph

Declaration
public static System.Collections.Generic.IEnumerable<TNode> AStarSearch<TNode, TNumeric>(this IGraphWeighted<TNode, TNumeric> graph, TNode Source, TNode Destination, Statics.SearchHeuristic<TNode, TNumeric> CustomHeuristic, out TNumeric TotalWeight)
Parameters
Type Name Description
IGraphWeighted<TNode, TNumeric> graph

The weighted graph object

TNode Source

The node to begin search from

TNode Destination

The node to search

Statics.SearchHeuristic<TNode, TNumeric> CustomHeuristic

The heuristic function of the node

TNumeric TotalWeight

The total cost or weight incurred from source to destination

Returns
Type Description
System.Collections.Generic.IEnumerable<TNode>

IEnumerable of the ordered sequence of nodes from source to destination

Type Parameters
Name Description
TNode

The Node type of the graph

TNumeric

The Numeric type of the weighted graph

| Improve this Doc View Source

AStarSearch<TNode, TNumeric>(IGraphWeighted<TNode, TNumeric>, TNode, TNode, Statics.SearchHeuristic<TNode, TNumeric>, Action<TNode>, out TNumeric)

Perfoms A* Search on the graph and executes action on every node in path

Declaration
public static void AStarSearch<TNode, TNumeric>(this IGraphWeighted<TNode, TNumeric> graph, TNode Source, TNode Destination, Statics.SearchHeuristic<TNode, TNumeric> CustomHeuristic, Action<TNode> action, out TNumeric TotalWeight)
Parameters
Type Name Description
IGraphWeighted<TNode, TNumeric> graph

The weighted graph object

TNode Source

The node to begin search from

TNode Destination

The node to search

Statics.SearchHeuristic<TNode, TNumeric> CustomHeuristic

The heuristic function of the node

Action<TNode> action

The action to perform for every node on path

TNumeric TotalWeight

The total cost or weight incurred from source to destination

Type Parameters
Name Description
TNode

The Node type of the graph

TNumeric

The Numeric type of the weighted graph

| Improve this Doc View Source

BinomialCoefficient<T>(T, T)

Computes the Binomial coefficient (N choose n).

Declaration
public static T BinomialCoefficient<T>(T N, T n)
Parameters
Type Name Description
T N

The size of the entire set (N choose n).

T n

The size of the subset (N choose n).

Returns
Type Description
T

The computed binomial coefficient (N choose n).

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

Build<T>(T[])

Builds a stepper from values.

Declaration
public static Action<Action<T>> Build<T>(params T[] values)
Parameters
Type Name Description
T[] values

The values to build the stepper from.

Returns
Type Description
Action<Action<T>>

The resulting stepper function for the provided values.

Type Parameters
Name Description
T

The generic type of the stepper to build.

| Improve this Doc View Source

BuildArray<T>(Int32, Func<Int32, T>)

Builds an array from a size and initialization delegate.

Declaration
public static T[] BuildArray<T>(int size, Func<int, T> func)
Parameters
Type Name Description
System.Int32 size

The size of the array to build.

Func<System.Int32, T> func

The initialization pattern.

Returns
Type Description
T[]

The built array.

Type Parameters
Name Description
T

The generic type of the array.

| Improve this Doc View Source

Clamp<T>(T, T, T)

Gets a value restricted to a minimum and maximum range.

Declaration
public static T Clamp<T>(T value, T minimum, T maximum)
Parameters
Type Name Description
T value

The value to clamp.

T minimum

The minimum of the range to clamp the value by.

T maximum

The maximum of the range to clamp the value by.

Returns
Type Description
T

The value restricted to the provided range.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Combinations<T>(T[][], Statics.Action_ReadOnlySpan<T>)

Iterates through all combinations of the provided per-index element values.

Declaration
public static void Combinations<T>(T[][] elementPosibilities, Statics.Action_ReadOnlySpan<T> action)
Parameters
Type Name Description
T[][] elementPosibilities

The possible element values at each index.

Statics.Action_ReadOnlySpan<T> action

The action to perform on each possible combination.

Type Parameters
Name Description
T

The element type of the combinations to iterate.

| Improve this Doc View Source

Combinations<T>(Int32, Statics.Action_ReadOnlySpan<T>, Func<Int32, Int32>, Func<Int32, Int32, T>)

Iterates through all combinations of the provided per-index element values.

Declaration
public static void Combinations<T>(int length, Statics.Action_ReadOnlySpan<T> action, Func<int, int> indexPossibilities, Func<int, int, T> valueAt)
Parameters
Type Name Description
System.Int32 length

The length of the spans to iterate.

Statics.Action_ReadOnlySpan<T> action

The action to perform on each combination.

Func<System.Int32, System.Int32> indexPossibilities

The function to get the possible element values at each index.

Func<System.Int32, System.Int32, T> valueAt

The action to perform on each possible combination.

Type Parameters
Name Description
T

The element type of the combinations to iterate.

| Improve this Doc View Source

Combinations<T, TAction>(T[][], TAction)

Iterates through all combinations of the provided per-index element values.

Declaration
public static void Combinations<T, TAction>(T[][] elementPosibilities, TAction action = default(TAction))
    where TAction : struct, Statics.IAction_ReadOnlySpan<T>
Parameters
Type Name Description
T[][] elementPosibilities

The possible element values at each index.

TAction action

The action to perform on each possible combination.

Type Parameters
Name Description
T

The element type of the combinations to iterate.

TAction

The action to perform on each combination.

| Improve this Doc View Source

Combinations<T, TAction, TIndexPossibilities, TValueAt>(Int32, TAction, TIndexPossibilities, TValueAt)

Iterates through all combinations of the provided per-index element values.

Declaration
public static void Combinations<T, TAction, TIndexPossibilities, TValueAt>(int length, TAction action = default(TAction), TIndexPossibilities indexPossibilities = default(TIndexPossibilities), TValueAt valueAt = default(TValueAt))
    where TAction : struct, Statics.IAction_ReadOnlySpan<T> where TIndexPossibilities : struct, IFunc<int, int> where TValueAt : struct, IFunc<int, int, T>
Parameters
Type Name Description
System.Int32 length

The length of the spans to iterate.

TAction action

The action to perform on each combination.

TIndexPossibilities indexPossibilities

The function to get the possible element values at each index.

TValueAt valueAt

The action to perform on each possible combination.

Type Parameters
Name Description
T

The element type of the combinations to iterate.

TAction

Thetype of action to perform on each combination.

TIndexPossibilities

The type of function to get the possible element values at each index.

TValueAt

The type of action to perform on each possible combination.

| Improve this Doc View Source

CombinationsCount<T>(T, T[])

Computes the combinations of N values using the n grouping definitions.

Declaration
public static T CombinationsCount<T>(T N, T[] n)
Parameters
Type Name Description
T N

The number of values to compute the combinations of.

T[] n

The groups and how many values fall into each group.

Returns
Type Description
T

The computed number of combinations.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

CombineRanges<T>(System.Collections.Generic.IEnumerable<(T A, T B)>)

Simplifies a sequence of ranges by merging ranges without gaps between them.

Declaration
public static System.Collections.Generic.IEnumerable<(T A, T B)> CombineRanges<T>(System.Collections.Generic.IEnumerable<(T A, T B)> ranges)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.ValueTuple<T, T>> ranges

The ranges to be simplified.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<T, T>>

A potentially smaller sequence of ranges that have been merged if there were no gaps in no particular order.

Type Parameters
Name Description
T

The type of values in the sequances of ranges to combine.

| Improve this Doc View Source

Compare<T>(T, T)

Compares two values.

Declaration
public static CompareResult Compare<T>(T a, T b)
Parameters
Type Name Description
T a

The first value of the comparison.

T b

The second value of the comparison.

Returns
Type Description
CompareResult

The result of the comparison.

Type Parameters
Name Description
T

The type of values to compare.

| Improve this Doc View Source

Concat<T>(Action<Action<T>>, Action<Action<T>>[])

Concatenates steppers.

Declaration
public static Action<Action<T>> Concat<T>(this Action<Action<T>> stepper, params Action<Action<T>>[] otherSteppers)
Parameters
Type Name Description
Action<Action<T>> stepper

The first stepper of the contactenation.

Action<Action<T>>[] otherSteppers

The other steppers of the concatenation.

Returns
Type Description
Action<Action<T>>

The concatenated steppers as a single stepper.

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

ConcatToString(Action<Action<Char>>)

Converts a stepper into a string of the concatenated chars.

Declaration
public static string ConcatToString(this Action<Action<char>> stepper)
Parameters
Type Name Description
Action<Action<System.Char>> stepper

The stepper to concatenate the values into a string.

Returns
Type Description
System.String

The string of the concatenated chars.

| Improve this Doc View Source

ConstructRectangularJaggedArray<T>(Int32, Int32)

Constructs a square jagged array of the desired dimensions.

Declaration
public static T[][] ConstructRectangularJaggedArray<T>(int length1, int length2)
Parameters
Type Name Description
System.Int32 length1

The length of the first dimension.

System.Int32 length2

The length of the second dimension.

Returns
Type Description
T[][]

The constructed jagged array.

Type Parameters
Name Description
T

The generic type to store in the jagged array.

| Improve this Doc View Source

ConstructRectangularJaggedArray<T>(Int32, Int32, Func<Int32, Int32, T>)

Constructs a square jagged array of the desired dimensions.

Declaration
public static T[][] ConstructRectangularJaggedArray<T>(int length1, int length2, Func<int, int, T> func)
Parameters
Type Name Description
System.Int32 length1

The length of the first dimension.

System.Int32 length2

The length of the second dimension.

Func<System.Int32, System.Int32, T> func

The function to initialize the values with.

Returns
Type Description
T[][]

The constructed jagged array.

Type Parameters
Name Description
T

The generic type to store in the jagged array.

| Improve this Doc View Source

ConstructSquareJaggedArray<T>(Int32)

Constructs a square jagged array of the desired dimensions.

Declaration
public static T[][] ConstructSquareJaggedArray<T>(int sideLength)
Parameters
Type Name Description
System.Int32 sideLength

The length of each dimension.

Returns
Type Description
T[][]

The constructed jagged array.

Type Parameters
Name Description
T

The generic type to store in the jagged array.

| Improve this Doc View Source

ConstructSquareJaggedArray<T>(Int32, Func<Int32, Int32, T>)

Constructs a square jagged array of the desired dimensions.

Declaration
public static T[][] ConstructSquareJaggedArray<T>(int sideLength, Func<int, int, T> func)
Parameters
Type Name Description
System.Int32 sideLength

The length of each dimension.

Func<System.Int32, System.Int32, T> func

The function to initialize the values with.

Returns
Type Description
T[][]

The constructed jagged array.

Type Parameters
Name Description
T

The generic type to store in the jagged array.

| Improve this Doc View Source

Contains<T>(Span<T>, T, Nullable<Func<T, T, Boolean>>)

Determines if a span contains a value.

Declaration
public static bool Contains<T>(Span<T> span, T value, Func<T, T, bool>? equate = null)
Parameters
Type Name Description
Span<T> span

The span to check for the value in.

T value

The value to look for.

System.Nullable<Func<T, T, System.Boolean>> equate

The function for equating values.

Returns
Type Description
System.Boolean

True if the value was found.

Type Parameters
Name Description
T

The element type of the span.

| Improve this Doc View Source

Contains<T, TEquate>(Span<T>, T, TEquate)

Determines if a span contains a value.

Declaration
public static bool Contains<T, TEquate>(Span<T> span, T value, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
Span<T> span

The span to check for the value in.

T value

The value to look for.

TEquate equate

The function for equating values.

Returns
Type Description
System.Boolean

True if the value was found.

Type Parameters
Name Description
T

The element type of the span.

TEquate

The type of function for equating values.

| Improve this Doc View Source

ContainsAny(String, Char[])

Checks if a string contains any of a collections on characters.

Declaration
public static bool ContainsAny(this string string, params char[] chars)
Parameters
Type Name Description
System.String string

The string to see if it contains any of the specified characters.

System.Char[] chars

The characters to check if the string contains any of them.

Returns
Type Description
System.Boolean

True if the string contains any of the provided characters. False if not.

| Improve this Doc View Source

ContainsDuplicates<T>(Action<Action<T>>)

Determines if the data contains any duplicates.

Declaration
public static bool ContainsDuplicates<T>(this Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper function for the data.

Returns
Type Description
System.Boolean

True if the data contains duplicates. False if not.

Type Parameters
Name Description
T

The generic type of the data.

Remarks

Use the StepperBreak overload if possible. It is more effiecient.

| Improve this Doc View Source

ContainsDuplicates<T>(Action<Action<T>>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Determines if the data contains any duplicates.

Declaration
public static bool ContainsDuplicates<T>(this Action<Action<T>> stepper, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper function for the data.

System.Nullable<Func<T, T, System.Boolean>> equate

An equality function for the data

System.Nullable<Func<T, System.Int32>> hash

A hashing function for the data.

Returns
Type Description
System.Boolean

True if the data contains duplicates. False if not.

Type Parameters
Name Description
T

The generic type of the data.

Remarks

Use the StepperBreak overload if possible. It is more effiecient.

| Improve this Doc View Source

ContainsDuplicates<T>(Func<Func<T, StepStatus>, StepStatus>)

Determines if the data contains any duplicates.

Declaration
public static bool ContainsDuplicates<T>(this Func<Func<T, StepStatus>, StepStatus> stepper)
Parameters
Type Name Description
Func<Func<T, StepStatus>, StepStatus> stepper

The stepper function for the data.

Returns
Type Description
System.Boolean

True if the data contains duplicates. False if not.

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

ContainsDuplicates<T>(Func<Func<T, StepStatus>, StepStatus>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Determines if the data contains any duplicates.

Declaration
public static bool ContainsDuplicates<T>(this Func<Func<T, StepStatus>, StepStatus> stepper, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
Func<Func<T, StepStatus>, StepStatus> stepper

The stepper function for the data.

System.Nullable<Func<T, T, System.Boolean>> equate

An equality function for the data

System.Nullable<Func<T, System.Int32>> hash

A hashing function for the data.

Returns
Type Description
System.Boolean

True if the data contains duplicates. False if not.

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

ContainsDuplicates<T>(Span<T>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Determines if the span contains any duplicate values.

Declaration
public static bool ContainsDuplicates<T>(Span<T> span, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
Span<T> span

The span to look for duplicates in.

System.Nullable<Func<T, T, System.Boolean>> equate

The function for equating values.

System.Nullable<Func<T, System.Int32>> hash

The function for hashing values.

Returns
Type Description
System.Boolean

True if the span contains duplicates.

Type Parameters
Name Description
T

The element type of the span.

| Improve this Doc View Source

ContainsDuplicates<T, TEquate, THash>(Span<T>, TEquate, THash)

Determines if the span contains any duplicate values.

Declaration
public static bool ContainsDuplicates<T, TEquate, THash>(Span<T> span, TEquate equate = default(TEquate), THash hash = default(THash))
    where TEquate : struct, IFunc<T, T, bool> where THash : struct, IFunc<T, int>
Parameters
Type Name Description
Span<T> span

The span to look for duplicates in.

TEquate equate

The function for equating values.

THash hash

The function for hashing values.

Returns
Type Description
System.Boolean

True if the span contains duplicates.

Type Parameters
Name Description
T

The element type of the span.

TEquate

The type of function for equating values.

THash

The type of function for hashing values.

| Improve this Doc View Source

Convert<TA, TB>(TA)

Converts a from TA to TB.

Declaration
public static TB Convert<TA, TB>(TA a)
Parameters
Type Name Description
TA a

The value to convert.

Returns
Type Description
TB

The a value of TB type.

Type Parameters
Name Description
TA

The type of the value to convert.

TB

The type to convert the value to.

| Improve this Doc View Source

Convert<TA, TB>(Action<Action<TA>>, Func<TA, TB>)

Converts the values in this stepper to another type.

Declaration
public static Action<Action<TB>> Convert<TA, TB>(this Action<Action<TA>> stepper, Func<TA, TB> func)
Parameters
Type Name Description
Action<Action<TA>> stepper

The stepper to convert.

Func<TA, TB> func

The conversion function.

Returns
Type Description
Action<Action<TB>>

The converted stepper.

Type Parameters
Name Description
TA

The generic type of the values of the original stepper.

TB

The generic type of the values to convert the stepper into.

| Improve this Doc View Source

CosecantQuadratic<T>(Angle<T>)

Estimates the cosecant ratio using piecewise quadratic equations. Fast but NOT very accurate.

Declaration
public static T CosecantQuadratic<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the quadratic estimated cosecant ratio of.

Returns
Type Description
T

The quadratic estimation of the cosecant ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

CosecantSystem<T>(Angle<T>)

Computes the cosecant ratio of an angle using the system's sine function. WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

Declaration
public static T CosecantSystem<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the cosecant ratio of.

Returns
Type Description
T

The cosecant ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

Remarks

WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

| Improve this Doc View Source

CosineQuadratic<T>(Angle<T>)

Estimates the cosine ratio using piecewise quadratic equations. Fast but NOT very accurate.

Declaration
public static T CosineQuadratic<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the quadratic estimated cosine ratio of.

Returns
Type Description
T

The quadratic estimation of the cosine ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

CosineSystem<T>(Angle<T>)

Computes the cosine ratio of an angle using the system's cosine function. WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

Declaration
public static T CosineSystem<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the cosine ratio of.

Returns
Type Description
T

The cosine ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

Remarks

WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

| Improve this Doc View Source

CosineTaylorSeries<T>(Angle<T>, Nullable<Predicate<T>>)

Computes the cosine ratio of an angle using the relative talor series. Accurate but slow.

Declaration
public static T CosineTaylorSeries<T>(Angle<T> a, Predicate<T>? predicate = null)
Parameters
Type Name Description
Angle<T> a

The angle to compute the cosine ratio of.

System.Nullable<Predicate<T>> predicate

Determines if coputation should continue or is accurate enough.

Returns
Type Description
T

The taylor series computed cosine ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

CotangentQuadratic<T>(Angle<T>)

Estimates the cotangent ratio using piecewise quadratic equations. Fast but NOT very accurate.

Declaration
public static T CotangentQuadratic<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the quadratic estimated cotangent ratio of.

Returns
Type Description
T

The quadratic estimation of the cotangent ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

CotangentSystem<T>(Angle<T>)

Computes the cotangent ratio of an angle using the system's tangent function. WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

Declaration
public static T CotangentSystem<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the cotangent ratio of.

Returns
Type Description
T

The cotangent ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

Remarks

WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

| Improve this Doc View Source

Count<T>(Action<Action<T>>)

Counts the number of items in the stepper.

Declaration
public static int Count<T>(this Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper to count the items of.

Returns
Type Description
System.Int32

The number of items in the stepper.

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

CountLines(String)

Counts the number of lines in the string.

Declaration
public static int CountLines(this string str)
Parameters
Type Name Description
System.String str

The string to get the line count of.

Returns
Type Description
System.Int32

The number of lines in the string.

| Improve this Doc View Source

CreateDelegate<TDelegate>(MethodInfo)

Creates a delegate of the specified type from this .

Declaration
public static TDelegate CreateDelegate<TDelegate>(this MethodInfo methodInfo)
    where TDelegate : Delegate
Parameters
Type Name Description
MethodInfo methodInfo

The to create the delegate from.

Returns
Type Description
TDelegate

The delegate for this .

Type Parameters
Name Description
TDelegate

The type of the delegate to create.

Remarks

This extension is syntax sugar so you don't have to cast the return.

| Improve this Doc View Source

DijkstraSearch<TNode, TNumeric>(IGraphWeighted<TNode, TNumeric>, TNode, TNode, out TNumeric)

Performs Dijkstra search on graph

Declaration
public static System.Collections.Generic.IEnumerable<TNode> DijkstraSearch<TNode, TNumeric>(this IGraphWeighted<TNode, TNumeric> graph, TNode Source, TNode Destination, out TNumeric TotalWeight)
Parameters
Type Name Description
IGraphWeighted<TNode, TNumeric> graph

The weighted graph object to search

TNode Source

The node to begin searching from

TNode Destination

The node to search

TNumeric TotalWeight

The total cost or weight incurred from the Soruce to the Destination node

Returns
Type Description
System.Collections.Generic.IEnumerable<TNode>

IEnumerable of the ordered nodes in path from source to destination

Type Parameters
Name Description
TNode

The Node Type of the graph

TNumeric

The Numeric Type of the graph

| Improve this Doc View Source

DijkstraSearch<TNode, TNumeric>(IGraphWeighted<TNode, TNumeric>, TNode, TNode, Action<TNode>, out TNumeric)

Performs Dijkstra Search and executes action on every node in path

Declaration
public static void DijkstraSearch<TNode, TNumeric>(this IGraphWeighted<TNode, TNumeric> graph, TNode Source, TNode Destination, Action<TNode> action, out TNumeric TotalWeight)
Parameters
Type Name Description
IGraphWeighted<TNode, TNumeric> graph

The weighted graph object to search

TNode Source

The node to begin searching from

TNode Destination

The destination node to search

Action<TNode> action

The action to execute for every node on the path

TNumeric TotalWeight

The Total cost or weight incurred from the Source to the Destination node

Type Parameters
Name Description
TNode

The Node Type of the graph

TNumeric

The Numeric Type of the graph

| Improve this Doc View Source

Division<T>(T, T)

Divides two values [a / b].

Declaration
public static T Division<T>(T a, T b)
Parameters
Type Name Description
T a

The left operand.

T b

The right operand.

Returns
Type Description
T

The result of the division [a / b].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Division<T>(T, T, T, T[])

Divides multiple values [a / b / c / ...].

Declaration
public static T Division<T>(T a, T b, T c, params T[] d)
Parameters
Type Name Description
T a

The first operand of the division.

T b

The second operand of the division.

T c

The third operand of the division.

T[] d

The remaining values of the division.

Returns
Type Description
T

The result of the division [a / b / c / ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Division<T>(Action<Action<T>>)

Divides multiple values [step1 / step2 / step3 / ...].

Declaration
public static T Division<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper containing the values.

Returns
Type Description
T

The result of the division [step1 / step2 / step3 / ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Division<TA, TB, TC>(TA, TB)

Divides two values [a / b].

Declaration
public static TC Division<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the division [a / b].

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

EqualToLeniency<T>(T, T, T)

Checks for equality between two numeric values with a range of possibly leniency.

Declaration
public static bool EqualToLeniency<T>(T a, T b, T leniency)
Parameters
Type Name Description
T a

The first operand of the equality check.

T b

The second operand of the equality check.

T leniency

The allowed distance between the values to still be considered equal.

Returns
Type Description
System.Boolean

True if the values are within the allowed leniency of each other. False if not.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Equate<T>(T, T)

Checks for equality of two values [a == b].

Declaration
public static bool Equate<T>(T a, T b)
Parameters
Type Name Description
T a

The left operand.

T b

The right operand.

Returns
Type Description
System.Boolean

The result of the equality check.

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Equate<T>(T, T, T[])

Checks for equality among multiple values [a == b == c == ...].

Declaration
public static bool Equate<T>(T a, T b, params T[] c)
Parameters
Type Name Description
T a

The first operand of the equality check.

T b

The second operand of the equality check.

T[] c

The remaining operands of the equality check.

Returns
Type Description
System.Boolean

True if all operands are equal or false if not.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

EquateOccurences<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Checks if two spans are re-orders of each other meaning they contain the same number of each element.

Declaration
public static bool EquateOccurences<T>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span.

ReadOnlySpan<T> b

The second span.

System.Nullable<Func<T, T, System.Boolean>> equate
System.Nullable<Func<T, System.Int32>> hash
Returns
Type Description
System.Boolean

True if both spans contain the same number of each element.

Type Parameters
Name Description
T
| Improve this Doc View Source

EquateOccurences<T, TEquate, THash>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate, THash)

Checks if two spans are re-orders of each other meaning they contain the same number of each element.

Declaration
public static bool EquateOccurences<T, TEquate, THash>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate), THash hash = default(THash))
    where TEquate : struct, IFunc<T, T, bool> where THash : struct, IFunc<T, int>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span.

ReadOnlySpan<T> b

The second span.

TEquate equate

The method for determining equality of values.

THash hash

The method for hashing the values.

Returns
Type Description
System.Boolean

True if both spans contain the same number of each element.

Type Parameters
Name Description
T

The element type of each span.

TEquate

The type of method for determining equality of values.

THash

The type of method for hashing the values.

| Improve this Doc View Source

EquateSequence<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>)

Determines if two spans are equal.

Declaration
public static bool EquateSequence<T>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, Func<T, T, bool>? equate = null)
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span of the equate.

ReadOnlySpan<T> b

The second span of the equate.

System.Nullable<Func<T, T, System.Boolean>> equate

The element equate function.

Returns
Type Description
System.Boolean

True if the spans are equal; False if not.

Type Parameters
Name Description
T

The element type of the spans.

| Improve this Doc View Source

EquateSequence<T, TEquate>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate)

Determines if two spans are equal.

Declaration
public static bool EquateSequence<T, TEquate>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span of the equate.

ReadOnlySpan<T> b

The second span of the equate.

TEquate equate

The element equate function.

Returns
Type Description
System.Boolean

True if the spans are equal; False if not.

Type Parameters
Name Description
T

The element type of the spans.

TEquate

The type of element equate function.

| Improve this Doc View Source

EquateSequence<T, TA, TB, TEquate>(Int32, Int32, TA, TB, TEquate)

Determines if two sequences are equal.

Declaration
public static bool EquateSequence<T, TA, TB, TEquate>(int start, int end, TA a = default(TA), TB b = default(TB), TEquate equate = default(TEquate))
    where TA : struct, IFunc<int, T> where TB : struct, IFunc<int, T> where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
System.Int32 start

The inclusive starting index to equate from.

System.Int32 end

The inclusive ending index to equate to.

TA a

The first sequence of the equate.

TB b

The second sequence of the equate.

TEquate equate

The element equate function.

Returns
Type Description
System.Boolean

True if the spans are equal; False if not.

Type Parameters
Name Description
T

The element type of the sequences.

TA

The type of first sequence of the equate.

TB

The type of second sequence of the equate.

TEquate

The type of element equate function.

| Improve this Doc View Source

EquateSet<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Determines if neither span contains an element the other does not.

Declaration
public static bool EquateSet<T>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span.

ReadOnlySpan<T> b

The second span.

System.Nullable<Func<T, T, System.Boolean>> equate

The function for determining equality of values.

System.Nullable<Func<T, System.Int32>> hash

The function for hashing the values.

Returns
Type Description
System.Boolean

True if neither span contains an element the other does not.

Type Parameters
Name Description
T

The element type of each span.

| Improve this Doc View Source

EquateSet<T, TEquate, THash>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate, THash)

Determines if neither span contains an element the other does not.

Declaration
public static bool EquateSet<T, TEquate, THash>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate), THash hash = default(THash))
    where TEquate : struct, IFunc<T, T, bool> where THash : struct, IFunc<T, int>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span.

ReadOnlySpan<T> b

The second span.

TEquate equate

The function for determining equality of values.

THash hash

The function for hashing the values.

Returns
Type Description
System.Boolean

True if neither span contains an element the other does not.

Type Parameters
Name Description
T

The element type of each span.

TEquate

The type of function for determining equality of values.

THash

The type of function for hashing the values.

| Improve this Doc View Source

EveryNth<T>(Action<Action<T>>, Int32)

Reduces the stepper to be every nth value.

Declaration
public static Action<Action<T>> EveryNth<T>(this Action<Action<T>> stepper, int nth)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper to reduce.

System.Int32 nth

Represents the values to reduce the stepper to; "5" means every 5th value.

Returns
Type Description
Action<Action<T>>

The reduced stepper function.

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

Exponential<T>(T)

Computes the exponentional of a value [e ^ a].

Declaration
public static T Exponential<T>(T a)
Parameters
Type Name Description
T a

The value to compute the exponentional of.

Returns
Type Description
T

The exponential of the value [e ^ a].

Type Parameters
Name Description
T

The generic type of the operation.

| Improve this Doc View Source

Factorial<T>(T)

Computes the factorial of a numeric value [a!] == [a * (a - 1) * (a - 2) * ... * 1].

Declaration
public static T Factorial<T>(T a)
Parameters
Type Name Description
T a

The integer value to compute the factorial of.

Returns
Type Description
T

The computed factorial value.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

FactorPrimes<T>(T, Action<T>)

Factors the primes numbers of a numeric integer value.

Declaration
public static void FactorPrimes<T>(T a, Action<T> step)
Parameters
Type Name Description
T a

The value to factor the prime numbers of.

Action<T> step

The action to perform on all found prime factors.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

FilterOrdered<T>(ReadOnlySpan<T>, Action<T>, Nullable<Func<T, T, CompareResult>>)

Filters a sequence to only values that are in order.

Declaration
public static void FilterOrdered<T>(ReadOnlySpan<T> span, Action<T> step, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
Action<T> step
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

FilterOrdered<T>(System.Collections.Generic.IEnumerable<T>, Nullable<Func<T, T, CompareResult>>)

Filters a sequence to only values that are in order.

Declaration
public static System.Collections.Generic.IEnumerable<T> FilterOrdered<T>(this System.Collections.Generic.IEnumerable<T> enumerable, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> enumerable
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.Collections.Generic.IEnumerable<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

FilterOrdered<T>(Int32, Int32, Func<Int32, T>, Action<T>, Nullable<Func<T, T, CompareResult>>)

Filters a sequence to only values that are in order.

Declaration
public static void FilterOrdered<T>(int start, int end, Func<int, T> get, Action<T> step, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<T> step
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

FilterOrdered<T, TCompare>(System.Collections.Generic.IEnumerable<T>, TCompare)

Filters a sequence to only values that are in order.

Declaration
public static System.Collections.Generic.IEnumerable<T> FilterOrdered<T, TCompare>(this System.Collections.Generic.IEnumerable<T> enumerable, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> enumerable
TCompare compare
Returns
Type Description
System.Collections.Generic.IEnumerable<T>
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

FilterOrdered<T, TStep, TCompare>(ReadOnlySpan<T>, TStep, TCompare)

Filters a sequence to only values that are in order.

Declaration
public static void FilterOrdered<T, TStep, TCompare>(ReadOnlySpan<T> span, TStep step = default(TStep), TCompare compare = default(TCompare))
    where TStep : struct, IAction<T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TStep step
TCompare compare
Type Parameters
Name Description
T
TStep
TCompare
| Improve this Doc View Source

FilterOrdered<T, TGet, TStep, TCompare>(Int32, Int32, TGet, TStep, TCompare)

Filters a sequence to only values that are in order.

Declaration
public static void FilterOrdered<T, TGet, TStep, TCompare>(int start, int end, TGet get = default(TGet), TStep step = default(TStep), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TStep : struct, IAction<T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TStep step
TCompare compare
Type Parameters
Name Description
T
TGet
TStep
TCompare
| Improve this Doc View Source

Format<T>(T[], T)

Formats an array so that all values are the same.

Declaration
public static void Format<T>(this T[] array, T value)
Parameters
Type Name Description
T[] array

The array to format.

T value

The value to format all entries in the array with.

Type Parameters
Name Description
T

The generic type of the array to format.

| Improve this Doc View Source

Format<T>(T[], Func<Int32, T>)

Formats an array so that all values are the same.

Declaration
public static void Format<T>(this T[] array, Func<int, T> func)
Parameters
Type Name Description
T[] array

The array to format.

Func<System.Int32, T> func

The per-index format function.

Type Parameters
Name Description
T

The generic type of the array to format.

| Improve this Doc View Source

Gaps<T>(Action<T>, Action<T>)

Adds a step to the gaps (in-betweens) of another step funtion.

Declaration
public static Action<T> Gaps<T>(this Action<T> step, Action<T> gapStep)
Parameters
Type Name Description
Action<T> step

The step to add a gap step to.

Action<T> gapStep

The step to perform in the gaps.

Returns
Type Description
Action<T>

The combined step + gapStep function.

Type Parameters
Name Description
T

The generic type of the step function.

| Improve this Doc View Source

GeometricMean<T>(Action<Action<T>>)

Computes the geometric mean of a set of numbers.

Declaration
public static T GeometricMean<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of numbres to compute the geometric mean of.

Returns
Type Description
T

The computed geometric mean of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

GetEnumerator(Range)

Returns an that iterates through the range.

Declaration
public static System.Collections.Generic.IEnumerator<int> GetEnumerator(this Range range)
Parameters
Type Name Description
Range range

The range to get the of.

Returns
Type Description
System.Collections.Generic.IEnumerator<System.Int32>

An that iterates through the range.

| Improve this Doc View Source

GetEnumerator(System.Runtime.CompilerServices.ITuple)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<object> GetEnumerator(this System.Runtime.CompilerServices.ITuple tuple)
Parameters
Type Name Description
System.Runtime.CompilerServices.ITuple tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<System.Object>

An enumerator for a tuple.

| Improve this Doc View Source

GetEnumerator<T>((T, T, T, T, T, T, T))

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this (T, T, T, T, T, T, T) tuple)
Parameters
Type Name Description
System.ValueTuple<T, T, T, T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>((T, T, T, T, T, T))

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this (T, T, T, T, T, T) tuple)
Parameters
Type Name Description
System.ValueTuple<T, T, T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>((T, T, T, T, T))

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this (T, T, T, T, T) tuple)
Parameters
Type Name Description
System.ValueTuple<T, T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>((T, T, T, T))

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this (T, T, T, T) tuple)
Parameters
Type Name Description
System.ValueTuple<T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>((T, T, T))

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this (T, T, T) tuple)
Parameters
Type Name Description
System.ValueTuple<T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>((T, T))

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this (T, T) tuple)
Parameters
Type Name Description
System.ValueTuple<T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T, T, T, T, T, T, T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T, T, T, T, T, T, T> tuple)
Parameters
Type Name Description
Tuple<T, T, T, T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T, T, T, T, T, T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T, T, T, T, T, T> tuple)
Parameters
Type Name Description
Tuple<T, T, T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T, T, T, T, T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T, T, T, T, T> tuple)
Parameters
Type Name Description
Tuple<T, T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T, T, T, T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T, T, T, T> tuple)
Parameters
Type Name Description
Tuple<T, T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T, T, T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T, T, T> tuple)
Parameters
Type Name Description
Tuple<T, T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T, T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T, T> tuple)
Parameters
Type Name Description
Tuple<T, T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(Tuple<T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this Tuple<T> tuple)
Parameters
Type Name Description
Tuple<T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetEnumerator<T>(ValueTuple<T>)

Gets an enumerator for a tuple.

Declaration
public static System.Collections.Generic.IEnumerator<T> GetEnumerator<T>(this ValueTuple<T> tuple)
Parameters
Type Name Description
ValueTuple<T> tuple

The tuple to get an enumerator for.

Returns
Type Description
System.Collections.Generic.IEnumerator<T>

An enumerator for a tuple.

Type Parameters
Name Description
T

The type of values in the tuple.

| Improve this Doc View Source

GetGreatest<T>(ReadOnlySpan<T>, Int32, Nullable<Func<T, T, CompareResult>>)

Gets the count greatest values from values in no particular order.

Declaration
public static T[] GetGreatest<T>(ReadOnlySpan<T> values, int count, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

System.Nullable<Func<T, T, CompareResult>> compare

The function for comparing T instances.

Returns
Type Description
T[]

The count greatest values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

| Improve this Doc View Source

GetGreatest<T>(System.Collections.Generic.IEnumerable<T>, Int32, Nullable<Func<T, T, CompareResult>>)

Gets the count greatest values from values in no particular order.

Declaration
public static T[] GetGreatest<T>(System.Collections.Generic.IEnumerable<T> values, int count, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

System.Nullable<Func<T, T, CompareResult>> compare

The function for comparing T instances.

Returns
Type Description
T[]

The count greatest values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

| Improve this Doc View Source

GetGreatest<T, TCompare>(ReadOnlySpan<T>, Int32, TCompare)

Gets the count greatest values from values in no particular order.

Declaration
public static T[] GetGreatest<T, TCompare>(ReadOnlySpan<T> values, int count, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

TCompare compare

The function for comparing T instances.

Returns
Type Description
T[]

The count greatest values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

TCompare

The type of function for comparing T instances.

| Improve this Doc View Source

GetGreatest<T, TCompare>(System.Collections.Generic.IEnumerable<T>, Int32, TCompare)

Gets the count greatest values from values in no particular order.

Declaration
public static T[] GetGreatest<T, TCompare>(System.Collections.Generic.IEnumerable<T> values, int count, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

TCompare compare

The function for comparing T instances.

Returns
Type Description
T[]

The count greatest values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

TCompare

The type of function for comparing T instances.

| Improve this Doc View Source

GetLeast<T>(ReadOnlySpan<T>, Int32, Nullable<Func<T, T, CompareResult>>)

Gets the count least values from values in no particular order.

Declaration
public static T[] GetLeast<T>(ReadOnlySpan<T> values, int count, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

System.Nullable<Func<T, T, CompareResult>> compare

The function for comparing T instances.

Returns
Type Description
T[]

The count least values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

| Improve this Doc View Source

GetLeast<T>(System.Collections.Generic.IEnumerable<T>, Int32, Nullable<Func<T, T, CompareResult>>)

Gets the count least values from values in no particular order.

Declaration
public static T[] GetLeast<T>(System.Collections.Generic.IEnumerable<T> values, int count, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

System.Nullable<Func<T, T, CompareResult>> compare

The function for comparing T instances.

Returns
Type Description
T[]

The count least values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

| Improve this Doc View Source

GetLeast<T, TCompare>(ReadOnlySpan<T>, Int32, TCompare)

Gets the count least values from values in no particular order.

Declaration
public static T[] GetLeast<T, TCompare>(ReadOnlySpan<T> values, int count, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

TCompare compare

The function for comparing T instances.

Returns
Type Description
T[]

The count least values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

TCompare

The type of function for comparing T instances.

| Improve this Doc View Source

GetLeast<T, TCompare>(System.Collections.Generic.IEnumerable<T>, Int32, TCompare)

Gets the count least values from values in no particular order.

Declaration
public static T[] GetLeast<T, TCompare>(System.Collections.Generic.IEnumerable<T> values, int count, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> values

The values to get count values from.

System.Int32 count

The number of items to get from values.

TCompare compare

The function for comparing T instances.

Returns
Type Description
T[]

The count least values from values in no particular order.

Type Parameters
Name Description
T

The type of values.

TCompare

The type of function for comparing T instances.

| Improve this Doc View Source

GreaterThan<T>(T, T)

Checks if one value is greater than another [a > b].

Declaration
public static bool GreaterThan<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the greater than check.

T b

The second operand of the greater than check.

Returns
Type Description
System.Boolean

The result of the greater than check.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

GreaterThan<TA, TB, TC>(TA, TB)

Checks if one value is greater than another [a > b].

Declaration
public static TC GreaterThan<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the greater than operation.

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

GreaterThanOrEqual<T>(T, T)

Checks if one value is greater than or equal to another [a >= b].

Declaration
public static bool GreaterThanOrEqual<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the greater than or equal to check.

T b

The second operand of the greater than or equal to check.

Returns
Type Description
System.Boolean

The result of the greater than or equal to check.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

GreaterThanOrEqual<TA, TB, TC>(TA, TB)

Checks if one value is less greater or equal to another [a >= b].

Declaration
public static TC GreaterThanOrEqual<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the greater than or equal to operation.

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

GreatestCommonFactor<T>(T, T, T[])

Computes the greatest common factor of a set of numbers.

Declaration
public static T GreatestCommonFactor<T>(T a, T b, params T[] c)
Parameters
Type Name Description
T a

The first operand of the greatest common factor computation.

T b

The second operand of the greatest common factor computation.

T[] c

The remaining operands of the greatest common factor computation.

Returns
Type Description
T

The computed greatest common factor of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

GreatestCommonFactor<T>(Action<Action<T>>)

Computes the greatest common factor of a set of numbers.

Declaration
public static T GreatestCommonFactor<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of numbers to compute the greatest common factor of.

Returns
Type Description
T

The computed greatest common factor of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

HammingDistance(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Computes the Hamming distance (using an iterative algorithm).

Declaration
public static int HammingDistance(ReadOnlySpan<char> a, ReadOnlySpan<char> b)
Parameters
Type Name Description
ReadOnlySpan<System.Char> a

The first sequence of the operation.

ReadOnlySpan<System.Char> b

The second sequence of the operation.

Returns
Type Description
System.Int32

The computed Hamming distance of the two sequences.

| Improve this Doc View Source

HammingDistance<T, TEquate>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate)

Computes the Hamming distance (using an iterative algorithm).

Declaration
public static int HammingDistance<T, TEquate>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first sequence.

ReadOnlySpan<T> b

The second sequence.

TEquate equate

The equality check function.

Returns
Type Description
System.Int32

The computed Hamming distance of the two sequences.

Type Parameters
Name Description
T

The element type of the sequences.

TEquate

The type of equality check function.

| Improve this Doc View Source

HammingDistance<T, TGetA, TGetB, TEquate>(Int32, TGetA, TGetB, TEquate)

Computes the Hamming distance (using an iterative algorithm).

Declaration
public static int HammingDistance<T, TGetA, TGetB, TEquate>(int length, TGetA a = default(TGetA), TGetB b = default(TGetB), TEquate equate = default(TEquate))
    where TGetA : struct, IFunc<int, T> where TGetB : struct, IFunc<int, T> where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
System.Int32 length

The length of the sequences.

TGetA a

The get index function for the first sequence.

TGetB b

The get index function for the second sequence.

TEquate equate

The equality check function.

Returns
Type Description
System.Int32

The computed Hamming distance of the two sequences.

Type Parameters
Name Description
T

The element type of the sequences.

TGetA

The type of get index function for the first sequence.

TGetB

The type of get index function for the second sequence.

TEquate

The type of equality check function.

| Improve this Doc View Source

Hash<T>(T)

Static wrapper for the instance based "object.GetHashCode" function.

Declaration
public static int Hash<T>(T value)
Parameters
Type Name Description
T value

The item to get the hash code of.

Returns
Type Description
System.Int32

The computed hash code using the base GetHashCode instance method.

Type Parameters
Name Description
T

The generic type of the hash operation.

| Improve this Doc View Source

IndentLineNumbers(String, Int32, Int32)

Indents a range of line numbers in a string.

Declaration
public static string IndentLineNumbers(this string string, int startingLineNumber, int endingLineNumber)
Parameters
Type Name Description
System.String string

The string to indent specified lines of.

System.Int32 startingLineNumber

The line number to start line indention on.

System.Int32 endingLineNumber

The line number to stop line indention on.

Returns
Type Description
System.String

The string with the specified lines indented.

| Improve this Doc View Source

IndentLineNumbers(String, Int32, Int32, Int32)

Indents a range of line numbers in a string.

Declaration
public static string IndentLineNumbers(this string string, int count, int startingLineNumber, int endingLineNumber)
Parameters
Type Name Description
System.String string

The string to indent specified lines of.

System.Int32 count

The number of tabs for the indention.

System.Int32 startingLineNumber

The line number to start line indention on.

System.Int32 endingLineNumber

The line number to stop line indention on.

Returns
Type Description
System.String

The string with the specified lines indented.

| Improve this Doc View Source

IndentLines(String)

Indents every line in a string with a single tab character.

Declaration
public static string IndentLines(this string string)
Parameters
Type Name Description
System.String string

The string to indent the lines of.

Returns
Type Description
System.String

The indented string.

| Improve this Doc View Source

IndentLines(String, Int32)

Indents every line in a string with a given number of tab characters.

Declaration
public static string IndentLines(this string string, int count)
Parameters
Type Name Description
System.String string

The string to indent the lines of.

System.Int32 count

The number of tabs of the indention.

Returns
Type Description
System.String

The indented string.

| Improve this Doc View Source

IndentNewLinesBetweenIndeces(String, Int32, Int32)

Indents after every new line sequence found between two string indeces.

Declaration
public static string IndentNewLinesBetweenIndeces(this string string, int start, int end)
Parameters
Type Name Description
System.String string

The string to be indented.

System.Int32 start

The starting index to look for new line sequences to indent.

System.Int32 end

The ending index to look for new line sequences to indent.

Returns
Type Description
System.String

The indented string.

| Improve this Doc View Source

IndentNewLinesBetweenIndeces(String, Int32, Int32, Int32)

Indents after every new line sequence found between two string indeces.

Declaration
public static string IndentNewLinesBetweenIndeces(this string string, int count, int start, int end)
Parameters
Type Name Description
System.String string

The string to be indented.

System.Int32 count

The number of tabs of this indention.

System.Int32 start

The starting index to look for new line sequences to indent.

System.Int32 end

The ending index to look for new line sequences to indent.

Returns
Type Description
System.String

The indented string.

| Improve this Doc View Source

Inequate<T>(T, T)

Checks for inequality of two values [a != b].

Declaration
public static bool Inequate<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the inequality check.

T b

The second operand of the inequality check.

Returns
Type Description
System.Boolean

The result of the inequality check.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Inequate<TA, TB, TC>(TA, TB)

Checks for inequality of two values [a != b].

Declaration
public static TC Inequate<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the inequality.

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

Inversion<T>(T)

Inverts a numeric value [1 / a].

Declaration
public static T Inversion<T>(T a)
Parameters
Type Name Description
T a

The numeric value to invert.

Returns
Type Description
T

The result of the inversion.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsDefined<TEnum>(TEnum)

Declaration
public static bool IsDefined<TEnum>(this TEnum value)
    where TEnum : struct, Enum
Parameters
Type Name Description
TEnum value
Returns
Type Description
System.Boolean
Type Parameters
Name Description
TEnum
| Improve this Doc View Source

IsEven<T>(T)

Determines if a numerical value is even.

Declaration
public static bool IsEven<T>(T a)
Parameters
Type Name Description
T a

The value to determine even status of.

Returns
Type Description
System.Boolean

Whether or not the value is even.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsInteger<T>(T)

Determines if a numerical value is an integer.

Declaration
public static bool IsInteger<T>(T a)
Parameters
Type Name Description
T a

The value to determine integer status of.

Returns
Type Description
System.Boolean

Whether or not the value is an integer.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsInterleavedIterative(ReadOnlySpan<Char>, ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a recursive algorithm.
Runtime: O(2^(Min(a.Length + b.Length, c.Length))), Ω(1)
Memory: O(1)

Declaration
public static bool IsInterleavedIterative(ReadOnlySpan<char> a, ReadOnlySpan<char> b, ReadOnlySpan<char> c)
Parameters
Type Name Description
ReadOnlySpan<System.Char> a
ReadOnlySpan<System.Char> b
ReadOnlySpan<System.Char> c
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsInterleavedIterative<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>)

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a interative algorithm.
Runtime: O(Min(a.Length * b.Length))), Ω(1)
Memory: O(a.Length * b.Length)

Declaration
public static bool IsInterleavedIterative<T>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, ReadOnlySpan<T> c, Func<T, T, bool>? equate = null)
Parameters
Type Name Description
ReadOnlySpan<T> a
ReadOnlySpan<T> b
ReadOnlySpan<T> c
System.Nullable<Func<T, T, System.Boolean>> equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsInterleavedIterative<T, TEquate>(ReadOnlySpan<T>, ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate)

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a interative algorithm.
Runtime: O(Min(a.Length * b.Length))), Ω(1)
Memory: O(a.Length * b.Length)

Declaration
public static bool IsInterleavedIterative<T, TEquate>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, ReadOnlySpan<T> c, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> a
ReadOnlySpan<T> b
ReadOnlySpan<T> c
TEquate equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TEquate
| Improve this Doc View Source

IsInterleavedRecursive(ReadOnlySpan<Char>, ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a recursive algorithm.
Runtime: O(2^(Min(a.Length + b.Length, c.Length))), Ω(1)
Memory: O(1)

Declaration
public static bool IsInterleavedRecursive(ReadOnlySpan<char> a, ReadOnlySpan<char> b, ReadOnlySpan<char> c)
Parameters
Type Name Description
ReadOnlySpan<System.Char> a
ReadOnlySpan<System.Char> b
ReadOnlySpan<System.Char> c
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsInterleavedRecursive<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>)

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a recursive algorithm.
Runtime: O(2^(Min(a.Length + b.Length, c.Length))), Ω(1)
Memory: O(1)

Declaration
public static bool IsInterleavedRecursive<T>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, ReadOnlySpan<T> c, Func<T, T, bool>? equate = null)
Parameters
Type Name Description
ReadOnlySpan<T> a
ReadOnlySpan<T> b
ReadOnlySpan<T> c
System.Nullable<Func<T, T, System.Boolean>> equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsInterleavedRecursive<T, TEquate>(ReadOnlySpan<T>, ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate)

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a recursive algorithm.
Runtime: O(2^(Min(a.Length + b.Length, c.Length))), Ω(1)
Memory: O(1)

Declaration
public static bool IsInterleavedRecursive<T, TEquate>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, ReadOnlySpan<T> c, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> a
ReadOnlySpan<T> b
ReadOnlySpan<T> c
TEquate equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TEquate
| Improve this Doc View Source

IsNegative<T>(T)

Determines if a numerical value is negative.

Declaration
public static bool IsNegative<T>(T a)
Parameters
Type Name Description
T a

The value to determine negative status of.

Returns
Type Description
System.Boolean

Whether or not the value is negative.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsNonNegative<T>(T)

Determines if a numerical value is non-negative.

Declaration
public static bool IsNonNegative<T>(T a)
Parameters
Type Name Description
T a

The value to determine non-negative status of.

Returns
Type Description
System.Boolean

Whether or not the value is non-negative.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsOdd<T>(T)

Determines if a numerical value is odd.

Declaration
public static bool IsOdd<T>(T a)
Parameters
Type Name Description
T a

The value to determine odd status of.

Returns
Type Description
System.Boolean

Whether or not the value is odd.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsOrdered<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Declaration
public static bool IsOrdered<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsOrdered<T>(System.Collections.Generic.IEnumerable<T>, Nullable<Func<T, T, CompareResult>>)

Declaration
public static bool IsOrdered<T>(this System.Collections.Generic.IEnumerable<T> enumerable, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> enumerable
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsOrdered<T>(Int32, Int32, Func<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Declaration
public static bool IsOrdered<T>(int start, int end, Func<int, T> get, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsOrdered<T, TCompare>(ReadOnlySpan<T>, TCompare)

Declaration
public static bool IsOrdered<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

IsOrdered<T, TCompare>(System.Collections.Generic.IEnumerable<T>, TCompare)

Declaration
public static bool IsOrdered<T, TCompare>(this System.Collections.Generic.IEnumerable<T> enumerable, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> enumerable
TCompare compare
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

IsOrdered<T, TCompare, TGet>(Int32, Int32, TCompare, TGet)

Declaration
public static bool IsOrdered<T, TCompare, TGet>(int start, int end, TCompare compare = default(TCompare), TGet get = default(TGet))
    where TCompare : struct, IFunc<T, T, CompareResult> where TGet : struct, IFunc<int, T>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TCompare compare
TGet get
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TCompare
TGet
| Improve this Doc View Source

IsPalindrome(ReadOnlySpan<Char>)

Determines if a sequence is a palindrome.

Declaration
public static bool IsPalindrome(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPalindrome<T>(ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>)

Determines if a sequence is a palindrome.

Declaration
public static bool IsPalindrome<T>(ReadOnlySpan<T> span, Func<T, T, bool>? equate = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, System.Boolean>> equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsPalindrome<T>(Int32, Int32, Func<Int32, T>, Nullable<Func<T, T, Boolean>>)

Determines if a sequence is a palindrome.

Declaration
public static bool IsPalindrome<T>(int start, int end, Func<int, T> get, Func<T, T, bool>? equate = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
System.Nullable<Func<T, T, System.Boolean>> equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

IsPalindrome<T, TEquate>(ReadOnlySpan<T>, TEquate)

Determines if a sequence is a palindrome.

Declaration
public static bool IsPalindrome<T, TEquate>(ReadOnlySpan<T> span, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> span
TEquate equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TEquate
| Improve this Doc View Source

IsPalindrome<T, TGet, TEquate>(Int32, Int32, TGet, TEquate)

Determines if a sequence is a palindrome.

Declaration
public static bool IsPalindrome<T, TGet, TEquate>(int start, int end, TGet get = default(TGet), TEquate equate = default(TEquate))
    where TGet : struct, IFunc<int, T> where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TEquate equate
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
TGet
TEquate
| Improve this Doc View Source

IsPositive<T>(T)

Determines if a numerical value is positive.

Declaration
public static bool IsPositive<T>(T a)
Parameters
Type Name Description
T a

The value to determine positive status of.

Returns
Type Description
System.Boolean

Whether or not the value is positive.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsPrime<T>(T)

Determines if a numerical value is prime.

Declaration
public static bool IsPrime<T>(T a)
Parameters
Type Name Description
T a

The value to determine prime status of.

Returns
Type Description
System.Boolean

Whether or not the value is prime.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

IsReorderOf<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Checks if two spans are re-orders of each other meaning they contain the same number of each element.

Declaration
public static bool IsReorderOf<T>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span.

ReadOnlySpan<T> b

The second span.

System.Nullable<Func<T, T, System.Boolean>> equate
System.Nullable<Func<T, System.Int32>> hash
Returns
Type Description
System.Boolean

True if both spans contain the same number of each element.

Type Parameters
Name Description
T
| Improve this Doc View Source

IsReorderOf<T, TEquate, THash>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate, THash)

Checks if two spans are re-orders of each other meaning they contain the same number of each element.

Declaration
public static bool IsReorderOf<T, TEquate, THash>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate), THash hash = default(THash))
    where TEquate : struct, IFunc<T, T, bool> where THash : struct, IFunc<T, int>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first span.

ReadOnlySpan<T> b

The second span.

TEquate equate

The method for determining equality of values.

THash hash

The method for hashing the values.

Returns
Type Description
System.Boolean

True if both spans contain the same number of each element.

Type Parameters
Name Description
T

The element type of each span.

TEquate

The type of method for determining equality of values.

THash

The type of method for hashing the values.

| Improve this Doc View Source

Iterate(Int32, Action<Int32>)

Steps through a set number of integers.

Declaration
public static void Iterate(int iterations, Action<int> step)
Parameters
Type Name Description
System.Int32 iterations

The number of times to iterate.

Action<System.Int32> step

The step function.

| Improve this Doc View Source

Join(Range, Func<Int32, String>, String)

Iterates a and joins the results of a System.Func<int, string> seperated by a seperator.

Declaration
public static string Join(Range range, Func<int, string> func, string seperator)
Parameters
Type Name Description
Range range

The range of values to use use on the <System.Func{int, string> func.

Func<System.Int32, System.String> func

The System.Func<int, string>.

System.String seperator

The seperator to join the values with.

Returns
Type Description
System.String

The resulting of the join.

| Improve this Doc View Source

LeastCommonMultiple<T>(T, T, T[])

Computes the least common multiple of a set of numbers.

Declaration
public static T LeastCommonMultiple<T>(T a, T b, params T[] c)
Parameters
Type Name Description
T a

The first operand of the least common muiltiple computation.

T b

The second operand of the least common muiltiple computation.

T[] c

The remaining operands of the least common muiltiple computation.

Returns
Type Description
T

The computed least common least common multiple of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

LeastCommonMultiple<T>(Action<Action<T>>)

Computes the least common multiple of a set of numbers.

Declaration
public static T LeastCommonMultiple<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of numbers to compute the least common multiple of.

Returns
Type Description
T

The computed least common least common multiple of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

LessThan<T>(T, T)

Checks if one value is less than another [a < b].

Declaration
public static bool LessThan<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the less than check.

T b

The second operand of the less than check.

Returns
Type Description
System.Boolean

The result of the less than check.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

LessThan<TA, TB, TC>(TA, TB)

Checks if one value is less than another [a < b].

Declaration
public static TC LessThan<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the less than operation.

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

LessThanOrEqual<T>(T, T)

Checks if one value is less than or equal to another [a <= b].

Declaration
public static bool LessThanOrEqual<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the less than or equal to check.

T b

The second operand of the less than or equal to check.

Returns
Type Description
System.Boolean

The result of the less than or equal to check.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

LessThanOrEqual<TA, TB, TC>(TA, TB)

Checks if one value is less than or equal to another [a <= b].

Declaration
public static TC LessThanOrEqual<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the less than or equal to operation.

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

LevenshteinDistanceIterative(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Computes the Levenshtein distance (using an iterative algorithm).

Declaration
public static int LevenshteinDistanceIterative(ReadOnlySpan<char> a, ReadOnlySpan<char> b)
Parameters
Type Name Description
ReadOnlySpan<System.Char> a

The first sequence of the operation.

ReadOnlySpan<System.Char> b

The second sequence of the operation.

Returns
Type Description
System.Int32

The computed Levenshtein distance of the two sequences.

| Improve this Doc View Source

LevenshteinDistanceIterative<T, TEquate>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate)

Computes the Levenshtein distance (using an iterative algorithm).

Declaration
public static int LevenshteinDistanceIterative<T, TEquate>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first sequence.

ReadOnlySpan<T> b

The second sequence.

TEquate equate

The equality check function.

Returns
Type Description
System.Int32

The computed Levenshtein distance of the two sequences.

Type Parameters
Name Description
T

The element type of the sequences.

TEquate

The type of equality check function.

| Improve this Doc View Source

LevenshteinDistanceIterative<T, TGetA, TGetB, TEquate>(Int32, Int32, TGetA, TGetB, TEquate)

Computes the Levenshtein distance (using an iterative algorithm).

Declaration
public static int LevenshteinDistanceIterative<T, TGetA, TGetB, TEquate>(int a_length, int b_length, TGetA a = default(TGetA), TGetB b = default(TGetB), TEquate equate = default(TEquate))
    where TGetA : struct, IFunc<int, T> where TGetB : struct, IFunc<int, T> where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
System.Int32 a_length

The length of the first sequence.

System.Int32 b_length

The length of the second sequence.

TGetA a

The get index function for the first sequence.

TGetB b

The get index function for the second sequence.

TEquate equate

The equality check function.

Returns
Type Description
System.Int32

The computed Levenshtein distance of the two sequences.

Type Parameters
Name Description
T

The element type of the sequences.

TGetA

The type of get index function for the first sequence.

TGetB

The type of get index function for the second sequence.

TEquate

The type of equality check function.

| Improve this Doc View Source

LevenshteinDistanceRecursive(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Computes the Levenshtein distance (using an recursive algorithm).

Declaration
public static int LevenshteinDistanceRecursive(ReadOnlySpan<char> a, ReadOnlySpan<char> b)
Parameters
Type Name Description
ReadOnlySpan<System.Char> a

The first sequence of the operation.

ReadOnlySpan<System.Char> b

The second sequence of the operation.

Returns
Type Description
System.Int32

The computed Levenshtein distance of the two sequences.

| Improve this Doc View Source

LevenshteinDistanceRecursive<T, TEquate>(ReadOnlySpan<T>, ReadOnlySpan<T>, TEquate)

Computes the Levenshtein distance (using an recursive algorithm).

Declaration
public static int LevenshteinDistanceRecursive<T, TEquate>(ReadOnlySpan<T> a, ReadOnlySpan<T> b, TEquate equate = default(TEquate))
    where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
ReadOnlySpan<T> a

The first sequence.

ReadOnlySpan<T> b

The second sequence.

TEquate equate

The equality check function.

Returns
Type Description
System.Int32

The computed Levenshtein distance of the two sequences.

Type Parameters
Name Description
T

The element type of the sequences.

TEquate

The type of equality check function.

| Improve this Doc View Source

LevenshteinDistanceRecursive<T, TGetA, TGetB, TEquate>(Int32, Int32, TGetA, TGetB, TEquate)

Computes the Levenshtein distance (using an recursive algorithm).

Declaration
public static int LevenshteinDistanceRecursive<T, TGetA, TGetB, TEquate>(int a_length, int b_length, TGetA a = default(TGetA), TGetB b = default(TGetB), TEquate equate = default(TEquate))
    where TGetA : struct, IFunc<int, T> where TGetB : struct, IFunc<int, T> where TEquate : struct, IFunc<T, T, bool>
Parameters
Type Name Description
System.Int32 a_length

The length of the first sequence.

System.Int32 b_length

The length of the second sequence.

TGetA a

The get index function for the first sequence.

TGetB b

The get index function for the second sequence.

TEquate equate

The equality check function.

Returns
Type Description
System.Int32

The computed Levenshtein distance of the two sequences.

Type Parameters
Name Description
T

The element type of the sequences.

TGetA

The type of get index function for the first sequence.

TGetB

The type of get index function for the second sequence.

TEquate

The type of equality check function.

| Improve this Doc View Source

LinearInterpolation<T>(T, T, T, T, T)

Linearly interpolations a value.

Declaration
public static T LinearInterpolation<T>(T x, T x0, T x1, T y0, T y1)
Parameters
Type Name Description
T x

The value along the first dimension to compute the linear interpolation for.

T x0

A known starting point along the first dimension.

T x1

A known ending point along the first dimension.

T y0

A known starting point along the second dimension.

T y1

A known ending point along the second dimension.

Returns
Type Description
T

The linearly interpolated value.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

LinearRegression2D<T>(Action<Action<T, T>>, out T, out T)

Computes the best fit line from a set of points in 2D space [y = slope * x + y_intercept].

Declaration
public static void LinearRegression2D<T>(Action<Action<T, T>> points, out T slope, out T y_intercept)
Parameters
Type Name Description
Action<Action<T, T>> points

The points to compute the best fit line of.

T slope

The slope of the computed best fit line [y = slope * x + y_intercept].

T y_intercept

The y intercept of the computed best fit line [y = slope * x + y_intercept].

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Logarithm<T>(T, T)

Computes the logarithm of a value.

Declaration
public static T Logarithm<T>(T value, T base)
Parameters
Type Name Description
T value

The value to compute the logarithm of.

T base

The base of the logarithm to compute.

Returns
Type Description
T

The computed logarithm value.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Maximum<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Finds the maximum value in a sequence.

Declaration
public static (int Index, T Value) Maximum<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.ValueTuple<System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Maximum<T>(Nullable<Func<T, T, CompareResult>>, T[])

Finds the maximum value in a sequence.

Declaration
public static (int Index, T Value) Maximum<T>(Func<T, T, CompareResult>? compare = null, params T[] values)
Parameters
Type Name Description
System.Nullable<Func<T, T, CompareResult>> compare
T[] values
Returns
Type Description
System.ValueTuple<System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Maximum<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the maximum value in a sequence.

Declaration
public static (int Index, T Value) Maximum<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
System.ValueTuple<System.Int32, T>
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

MaximumIndex<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Finds the maximum value in a sequence.

Declaration
public static int MaximumIndex<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.Int32
Type Parameters
Name Description
T
| Improve this Doc View Source

MaximumIndex<T>(Nullable<Func<T, T, CompareResult>>, T[])

Finds the maximum value in a sequence.

Declaration
public static int MaximumIndex<T>(Func<T, T, CompareResult>? compare = null, params T[] values)
Parameters
Type Name Description
System.Nullable<Func<T, T, CompareResult>> compare
T[] values
Returns
Type Description
System.Int32
Type Parameters
Name Description
T
| Improve this Doc View Source

MaximumIndex<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the maximum value in a sequence.

Declaration
public static int MaximumIndex<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
System.Int32
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

MaximumIndex<T, TGet, TCompare>(Int32, Int32, TGet, TCompare)

Finds the maximum value in a sequence.

Declaration
public static int MaximumIndex<T, TGet, TCompare>(int start, int end, TGet get, TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start

The inclusive starting index to find the maximum of.

System.Int32 end

The inclusive ending index to find the maximum of.

TGet get

The the get method.

TCompare compare

The method for comparing T values.

Returns
Type Description
System.Int32

The index of the first occurence of the maximum value in the sequence.

Type Parameters
Name Description
T

The type of values in the sequence.

TGet

The type of the get method.

TCompare

The type of method for comparing T values.

| Improve this Doc View Source

MaximumValue<T>(T, T, Nullable<Func<T, T, CompareResult>>)

Finds the maximum between two values.

Declaration
public static T MaximumValue<T>(T a, T b, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
T a
T b
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

MaximumValue<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Finds the maximum value in a sequence.

Declaration
public static T MaximumValue<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

MaximumValue<T>(Nullable<Func<T, T, CompareResult>>, T[])

Finds the maximum value in a sequence.

Declaration
public static T MaximumValue<T>(Func<T, T, CompareResult>? compare = null, params T[] values)
Parameters
Type Name Description
System.Nullable<Func<T, T, CompareResult>> compare
T[] values
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

MaximumValue<T, TCompare>(T, T, TCompare)

Finds the maximum between two values.

Declaration
public static T MaximumValue<T, TCompare>(T a, T b, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
T a
T b
TCompare compare
Returns
Type Description
T
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

MaximumValue<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the maximum value in a sequence.

Declaration
public static T MaximumValue<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
T
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

Mean<T>(T, T[])

Computes the mean of a set of numerical values.

Declaration
public static T Mean<T>(T a, params T[] b)
Parameters
Type Name Description
T a

The first value of the set of data to compute the mean of.

T[] b

The remaining values in the data set to compute the mean of.

Returns
Type Description
T

The computed mean of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Mean<T>(Action<Action<T>>)

Computes the mean of a set of numerical values.

Declaration
public static T Mean<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of data to compute the mean of.

Returns
Type Description
T

The computed mean of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

MeanDeviation<T>(Action<Action<T>>)

The mean deviation of a set of numbers.

Declaration
public static T MeanDeviation<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of numbers to compute the mean deviation of.

Returns
Type Description
T

The computed mean deviation of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

Median<T>(T[])

Computes the median of a set of data.

Declaration
public static T Median<T>(params T[] values)
Parameters
Type Name Description
T[] values

The set of data to compute the median of.

Returns
Type Description
T

The computed median value of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Median<T>(Action<Action<T>>)

Computes the median of a set of data.

Declaration
public static T Median<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of data to compute the median of.

Returns
Type Description
T

The computed median value of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Median<T>(Func<T, T, CompareResult>, T[])

Computes the median of a set of data.

Declaration
public static T Median<T>(Func<T, T, CompareResult> compare, params T[] values)
Parameters
Type Name Description
Func<T, T, CompareResult> compare

The comparison algorithm to sort the data by.

T[] values

The set of data to compute the median of.

Returns
Type Description
T

The computed median value of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Median<T>(Func<T, T, CompareResult>, Action<Action<T>>)

Computes the median of a set of data.

Declaration
public static T Median<T>(Func<T, T, CompareResult> compare, Action<Action<T>> stepper)
Parameters
Type Name Description
Func<T, T, CompareResult> compare

The comparison algorithm to sort the data by.

Action<Action<T>> stepper

The set of data to compute the median of.

Returns
Type Description
T

The computed median value of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Minimum<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Finds the minimum value in a sequence.

Declaration
public static (int Index, T Value) Minimum<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.ValueTuple<System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Minimum<T>(Nullable<Func<T, T, CompareResult>>, T[])

Finds the minimum value in a sequence.

Declaration
public static (int Index, T Value) Minimum<T>(Func<T, T, CompareResult>? compare = null, params T[] values)
Parameters
Type Name Description
System.Nullable<Func<T, T, CompareResult>> compare
T[] values
Returns
Type Description
System.ValueTuple<System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Minimum<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the minimum value in a sequence.

Declaration
public static (int Index, T Value) Minimum<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
System.ValueTuple<System.Int32, T>
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

MinimumIndex<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Finds the minimum value in a sequence.

Declaration
public static int MinimumIndex<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.Int32
Type Parameters
Name Description
T
| Improve this Doc View Source

MinimumIndex<T>(Nullable<Func<T, T, CompareResult>>, T[])

Finds the minimum value in a sequence.

Declaration
public static int MinimumIndex<T>(Func<T, T, CompareResult>? compare = null, params T[] values)
Parameters
Type Name Description
System.Nullable<Func<T, T, CompareResult>> compare
T[] values
Returns
Type Description
System.Int32
Type Parameters
Name Description
T
| Improve this Doc View Source

MinimumIndex<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the minimum value in a sequence.

Declaration
public static int MinimumIndex<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
System.Int32
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

MinimumValue<T>(T, T, Nullable<Func<T, T, CompareResult>>)

Finds the minimum between two values.

Declaration
public static T MinimumValue<T>(T a, T b, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
T a
T b
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

MinimumValue<T>(ReadOnlySpan<T>, Nullable<Func<T, T, CompareResult>>)

Finds the minimum value in a sequence.

Declaration
public static T MinimumValue<T>(ReadOnlySpan<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

MinimumValue<T>(Nullable<Func<T, T, CompareResult>>, T[])

Finds the minimum value in a sequence.

Declaration
public static T MinimumValue<T>(Func<T, T, CompareResult>? compare = null, params T[] values)
Parameters
Type Name Description
System.Nullable<Func<T, T, CompareResult>> compare
T[] values
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

MinimumValue<T, TCompare>(T, T, TCompare)

Finds the minimum between two values.

Declaration
public static T MinimumValue<T, TCompare>(T a, T b, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
T a
T b
TCompare compare
Returns
Type Description
T
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

MinimumValue<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the minimum value in a sequence.

Declaration
public static T MinimumValue<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TCompare compare
Returns
Type Description
T
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

Mode<T>(Action<T>, T, T[])

Gets the mode(s) of a data set.

Declaration
public static void Mode<T>(Action<T> step, T a, params T[] b)
Parameters
Type Name Description
Action<T> step

The action to perform on every mode value found.

T a

The first value of the data set.

T[] b

The rest of the data set.

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

Mode<T>(Action<T>, Func<T, T, Boolean>, T, T[])

Gets the mode(s) of a data set.

Declaration
public static void Mode<T>(Action<T> step, Func<T, T, bool> equate, T a, params T[] b)
Parameters
Type Name Description
Action<T> step

The action to perform on every mode value found.

Func<T, T, System.Boolean> equate

The equality delegate.

T a

The first value of the data set.

T[] b

The rest of the data set.

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

Mode<T>(Action<T>, Func<T, T, Boolean>, Func<T, Int32>, T, T[])

Gets the mode(s) of a data set.

Declaration
public static void Mode<T>(Action<T> step, Func<T, T, bool> equate, Func<T, int> hash, T a, params T[] b)
Parameters
Type Name Description
Action<T> step

The action to perform on every mode value found.

Func<T, T, System.Boolean> equate

The equality delegate.

Func<T, System.Int32> hash

The hash code delegate

T a

The first value of the data set.

T[] b

The rest of the data set.

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

Mode<T>(Action<T>, Func<T, Int32>, T, T[])

Gets the mode(s) of a data set.

Declaration
public static void Mode<T>(Action<T> step, Func<T, int> hash, T a, params T[] b)
Parameters
Type Name Description
Action<T> step

The action to perform on every mode value found.

Func<T, System.Int32> hash

The hash code delegate

T a

The first value of the data set.

T[] b

The rest of the data set.

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

Mode<T>(Action<Action<T>>, Action<T>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Gets the mode(s) of a data set.

Declaration
public static void Mode<T>(Action<Action<T>> stepper, Action<T> step, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
Action<Action<T>> stepper

The data set.

Action<T> step

The action to perform on every mode value found.

System.Nullable<Func<T, T, System.Boolean>> equate

The equality delegate.

System.Nullable<Func<T, System.Int32>> hash

The hash code delegate

Type Parameters
Name Description
T

The generic type of the data.

| Improve this Doc View Source

Multiplication<T>(T, T)

Multiplies two values [a * b].

Declaration
public static T Multiplication<T>(T a, T b)
Parameters
Type Name Description
T a

The left operand.

T b

The right operand.

Returns
Type Description
T

The result of the multiplication [a * b].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Multiplication<T>(T, T, T, T[])

Multiplies multiple values [a * b * c * ...].

Declaration
public static T Multiplication<T>(T a, T b, T c, params T[] d)
Parameters
Type Name Description
T a

The first operand.

T b

The second operand.

T c

The third operand.

T[] d

The remaining values.

Returns
Type Description
T

The result of the multiplication [a * b * c * ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Multiplication<T>(Action<Action<T>>)

Multiplies multiple values [step1 * step2 * step3 * ...].

Declaration
public static T Multiplication<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper containing the values.

Returns
Type Description
T

The result of the multiplication [step1 * step2 * step3 * ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Multiplication<TA, TB, TC>(TA, TB)

Multiplies two values [a * b].

Declaration
public static TC Multiplication<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the multiplication [a * b].

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

NaturalLogarithm<T>(T)

Computes the natural logarithm of a value [ln(a)].

Declaration
public static T NaturalLogarithm<T>(T a)
Parameters
Type Name Description
T a

The value to compute the natural log of.

Returns
Type Description
T

The natural log of the provided value [ln(a)].

Type Parameters
Name Description
T

The generic type of the operation.

| Improve this Doc View Source

Negation<T>(T)

Negates a value [-a].

Declaration
public static T Negation<T>(T a)
Parameters
Type Name Description
T a

The value to negate.

Returns
Type Description
T

The result of the negation [-a].

Type Parameters
Name Description
T

The type of the value to negate.

| Improve this Doc View Source

Negation<TA, TB>(TA)

Negates a value [-a].

Declaration
public static TB Negation<TA, TB>(TA a)
Parameters
Type Name Description
TA a

The value to negate.

Returns
Type Description
TB

The result of the negation [-a].

Type Parameters
Name Description
TA

The type of the value to negate.

TB

The resulting type of the negation.

| Improve this Doc View Source

Next<TStep, TRandom>(Int32, Int32, Int32, ReadOnlySpan<Int32>, TRandom, TStep)

Generates count random values in the [minValue..maxValue] range where minValue is inclusive and maxValue is exclusive.

Declaration
public static void Next<TStep, TRandom>(int count, int minValue, int maxValue, ReadOnlySpan<int> excluded, TRandom random = default(TRandom), TStep step = default(TStep))
    where TStep : struct, IAction<int> where TRandom : struct, IFunc<int, int, int>
Parameters
Type Name Description
System.Int32 count

The number of values to generate.

System.Int32 minValue

Inclusive endpoint of the random generation range.

System.Int32 maxValue

Exclusive endpoint of the random generation range.

ReadOnlySpan<System.Int32> excluded

Values that should be excluded during generation.

TRandom random

The random to generation algorithm.

TStep step

The function to perform on each generated value.

Type Parameters
Name Description
TStep

The type of function to perform on each generated value.

TRandom

The type of random to generation algorithm.

| Improve this Doc View Source

NextRollTracking<TStep, TRandom>(Int32, Int32, Int32, ReadOnlySpan<Int32>, TRandom, TStep)

Generates count random values in the [minValue..maxValue] range where minValue is inclusive and maxValue is exclusive.

Declaration
public static void NextRollTracking<TStep, TRandom>(int count, int minValue, int maxValue, ReadOnlySpan<int> excluded, TRandom random = default(TRandom), TStep step = default(TStep))
    where TStep : struct, IAction<int> where TRandom : struct, IFunc<int, int, int>
Parameters
Type Name Description
System.Int32 count

The number of values to generate.

System.Int32 minValue

Inclusive endpoint of the random generation range.

System.Int32 maxValue

Exclusive endpoint of the random generation range.

ReadOnlySpan<System.Int32> excluded

Values that should be excluded during generation.

TRandom random

The random to generation algorithm.

TStep step

The function to perform on each generated value.

Type Parameters
Name Description
TStep

The type of function to perform on each generated value.

TRandom

The type of random to generation algorithm.

| Improve this Doc View Source

Occurences<T>(T, T[])

Counts the number of occurences of each item.

Declaration
public static IMap<int, T> Occurences<T>(T a, params T[] b)
Parameters
Type Name Description
T a

The first value in the data.

T[] b

The rest of the data.

Returns
Type Description
IMap<System.Int32, T>

The occurence map of the data.

Type Parameters
Name Description
T

The generic type to count the occerences of.

| Improve this Doc View Source

Occurences<T>(Action<Action<T>>, Nullable<Func<T, T, Boolean>>, Nullable<Func<T, Int32>>)

Counts the number of occurences of each item.

Declaration
public static IMap<int, T> Occurences<T>(Action<Action<T>> stepper, Func<T, T, bool>? equate = null, Func<T, int>? hash = null)
Parameters
Type Name Description
Action<Action<T>> stepper

The data to count the occurences of.

System.Nullable<Func<T, T, System.Boolean>> equate

The equality delegate.

System.Nullable<Func<T, System.Int32>> hash

The hash code delegate.

Returns
Type Description
IMap<System.Int32, T>

The occurence map of the data.

Type Parameters
Name Description
T

The generic type to count the occerences of.

| Improve this Doc View Source

Occurences<T>(Func<T, T, Boolean>, T, T[])

Counts the number of occurences of each item.

Declaration
public static IMap<int, T> Occurences<T>(Func<T, T, bool> equate, T a, params T[] b)
Parameters
Type Name Description
Func<T, T, System.Boolean> equate

The equality delegate.

T a

The first value in the data.

T[] b

The rest of the data.

Returns
Type Description
IMap<System.Int32, T>

The occurence map of the data.

Type Parameters
Name Description
T

The generic type to count the occerences of.

| Improve this Doc View Source

Occurences<T>(Func<T, T, Boolean>, Func<T, Int32>, T, T[])

Counts the number of occurences of each item.

Declaration
public static IMap<int, T> Occurences<T>(Func<T, T, bool> equate, Func<T, int> hash, T a, params T[] b)
Parameters
Type Name Description
Func<T, T, System.Boolean> equate

The equality delegate.

Func<T, System.Int32> hash

The hash code delegate.

T a

The first value in the data.

T[] b

The rest of the data.

Returns
Type Description
IMap<System.Int32, T>

The occurence map of the data.

Type Parameters
Name Description
T

The generic type to count the occerences of.

| Improve this Doc View Source

Occurences<T>(Func<T, Int32>, T, T[])

Counts the number of occurences of each item.

Declaration
public static IMap<int, T> Occurences<T>(Func<T, int> hash, T a, params T[] b)
Parameters
Type Name Description
Func<T, System.Int32> hash

The hash code delegate.

T a

The first value in the data.

T[] b

The rest of the data.

Returns
Type Description
IMap<System.Int32, T>

The occurence map of the data.

Type Parameters
Name Description
T

The generic type to count the occerences of.

| Improve this Doc View Source

PadLinesLeft(String, String)

Adds a string onto the beginning of every line in a string.

Declaration
public static string PadLinesLeft(this string string, string padding)
Parameters
Type Name Description
System.String string

The string to pad.

System.String padding

The padding to add to the front of every line.

Returns
Type Description
System.String

The padded string.

| Improve this Doc View Source

PadLinesLeft(String, String, Int32, Int32)

Adds a string after every new line squence found between two indeces of a string.

Declaration
public static string PadLinesLeft(this string string, string padding, int startingLineNumber, int endingLineNumber)
Parameters
Type Name Description
System.String string

The string to be padded.

System.String padding

The padding to apply after every newline sequence found.

System.Int32 startingLineNumber

The starting index of the line in the string to pad.

System.Int32 endingLineNumber

The ending index of the line in the string to pad.

Returns
Type Description
System.String

The padded string.

| Improve this Doc View Source

PadLinesLeftBetweenIndeces(String, String, Int32, Int32)

Adds a string after every new line squence found between two indeces of a string.

Declaration
public static string PadLinesLeftBetweenIndeces(this string string, string padding, int start, int end)
Parameters
Type Name Description
System.String string

The string to be padded.

System.String padding

The padding to apply after every newline sequence found.

System.Int32 start

The starting index of the string to search for new line sequences.

System.Int32 end

The ending index of the string to search for new line sequences.

Returns
Type Description
System.String

The padded string.

| Improve this Doc View Source

PadLinesRight(String, String, Int32, Int32)

Adds a string before every new line squence found between two indeces of a string.

Declaration
public static string PadLinesRight(this string string, string padding, int startingLineNumber, int endingLineNumber)
Parameters
Type Name Description
System.String string

The string to be padded.

System.String padding

The padding to apply before every newline sequence found.

System.Int32 startingLineNumber

The starting index of the line in the string to pad.

System.Int32 endingLineNumber

The ending index of the line in the string to pad.

Returns
Type Description
System.String

The padded string.

| Improve this Doc View Source

PadLinesRightBetweenIndeces(String, String, Int32, Int32)

Adds a string before every new line squence found between two indeces of a string.

Declaration
public static string PadLinesRightBetweenIndeces(this string string, string padding, int start, int end)
Parameters
Type Name Description
System.String string

The string to be padded.

System.String padding

The padding to apply before every newline sequence found.

System.Int32 start

The starting index of the string to search for new line sequences.

System.Int32 end

The ending index of the string to search for new line sequences.

Returns
Type Description
System.String

The padded string.

| Improve this Doc View Source

PadSubstringLinesRight(String, String)

Adds a string onto the end of every line in a string.

Declaration
public static string PadSubstringLinesRight(this string string, string padding)
Parameters
Type Name Description
System.String string

The string to pad.

System.String padding

The padding to add to the front of every line.

Returns
Type Description
System.String

The padded string.

| Improve this Doc View Source

PerformBredthFirstSearch<TNode>(IGraph<TNode>, TNode, TNode)

Performs Breadth First Search and returns the path as ordered sequence of nodes

Declaration
public static System.Collections.Generic.IEnumerable<TNode> PerformBredthFirstSearch<TNode>(this IGraph<TNode> graph, TNode Source, TNode Destination)
Parameters
Type Name Description
IGraph<TNode> graph

The IGraph object

TNode Source

The node to begin the Breadth First Search from

TNode Destination

The node to search

Returns
Type Description
System.Collections.Generic.IEnumerable<TNode>

IEnumerable of the Nodes found along the path

Type Parameters
Name Description
TNode

The Node Type of the Graph

| Improve this Doc View Source

PerformBredthFirstSearch<TNode>(IGraph<TNode>, TNode, TNode, Action<TNode>)

Performs Breadth First Search and executes the specified action on every ordered node to in the path searched.

Declaration
public static void PerformBredthFirstSearch<TNode>(this IGraph<TNode> graph, TNode Source, TNode Destination, Action<TNode> action)
Parameters
Type Name Description
IGraph<TNode> graph

The IGraph object

TNode Source

The node to begin Breadth First Search from

TNode Destination

The node to search

Action<TNode> action

The action to perform

Type Parameters
Name Description
TNode

The Node Type of the graph

| Improve this Doc View Source

PermuteIterative<T>(Span<T>, Action)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T>(Span<T> span, Action action)
Parameters
Type Name Description
Span<T> span
Action action
Type Parameters
Name Description
T
| Improve this Doc View Source

PermuteIterative<T>(Int32, Int32, Action, Func<Int32, T>, Action<Int32, T>)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T>(int start, int end, Action action, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Action action
Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

PermuteIterative<T>(Int32, Int32, Action, Func<StepStatus>, Func<Int32, T>, Action<Int32, T>)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T>(int start, int end, Action action, Func<StepStatus> status, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Action action
Func<StepStatus> status
Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

PermuteIterative<T, TAction>(Span<T>, TAction)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T, TAction>(Span<T> span, TAction action = default(TAction))
    where TAction : struct, IAction
Parameters
Type Name Description
Span<T> span
TAction action
Type Parameters
Name Description
T
TAction
| Improve this Doc View Source

PermuteIterative<T, TStatus>(Span<T>, Action, TStatus)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T, TStatus>(Span<T> span, Action action, TStatus status = default(TStatus))
    where TStatus : struct, IFunc<StepStatus>
Parameters
Type Name Description
Span<T> span
Action action
TStatus status
Type Parameters
Name Description
T
TStatus
| Improve this Doc View Source

PermuteIterative<T, TAction, TStatus>(Span<T>, TAction, TStatus)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T, TAction, TStatus>(Span<T> span, TAction action = default(TAction), TStatus status = default(TStatus))
    where TAction : struct, IAction where TStatus : struct, IFunc<StepStatus>
Parameters
Type Name Description
Span<T> span
TAction action
TStatus status
Type Parameters
Name Description
T
TAction
TStatus
| Improve this Doc View Source

PermuteIterative<T, TAction, TGet, TSet>(Int32, Int32, TAction, TGet, TSet)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T, TAction, TGet, TSet>(int start, int end, TAction action = default(TAction), TGet get = default(TGet), TSet set = default(TSet))
    where TAction : struct, IAction where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TAction action
TGet get
TSet set
Type Parameters
Name Description
T
TAction
TGet
TSet
| Improve this Doc View Source

PermuteIterative<T, TAction, TStatus, TGet, TSet>(Int32, Int32, TAction, TStatus, TGet, TSet)

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void PermuteIterative<T, TAction, TStatus, TGet, TSet>(int start, int end, TAction action = default(TAction), TStatus status = default(TStatus), TGet get = default(TGet), TSet set = default(TSet))
    where TAction : struct, IAction where TStatus : struct, IFunc<StepStatus> where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TAction action
TStatus status
TGet get
TSet set
Type Parameters
Name Description
T
TAction
TStatus
TGet
TSet
| Improve this Doc View Source

PermuteRecursive<T>(Span<T>, Action)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T>(Span<T> span, Action action)
Parameters
Type Name Description
Span<T> span
Action action
Type Parameters
Name Description
T
| Improve this Doc View Source

PermuteRecursive<T>(Int32, Int32, Action, Func<Int32, T>, Action<Int32, T>)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T>(int start, int end, Action action, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Action action
Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

PermuteRecursive<T>(Int32, Int32, Action, Func<StepStatus>, Func<Int32, T>, Action<Int32, T>)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T>(int start, int end, Action action, Func<StepStatus> status, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Action action
Func<StepStatus> status
Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

PermuteRecursive<T, TAction>(Span<T>, TAction)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T, TAction>(Span<T> span, TAction action = default(TAction))
    where TAction : struct, IAction
Parameters
Type Name Description
Span<T> span
TAction action
Type Parameters
Name Description
T
TAction
| Improve this Doc View Source

PermuteRecursive<T, TStatus>(Span<T>, Action, TStatus)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T, TStatus>(Span<T> span, Action action, TStatus status = default(TStatus))
    where TStatus : struct, IFunc<StepStatus>
Parameters
Type Name Description
Span<T> span
Action action
TStatus status
Type Parameters
Name Description
T
TStatus
| Improve this Doc View Source

PermuteRecursive<T, TAction, TStatus>(Span<T>, TAction, TStatus)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T, TAction, TStatus>(Span<T> span, TAction action = default(TAction), TStatus status = default(TStatus))
    where TAction : struct, IAction where TStatus : struct, IFunc<StepStatus>
Parameters
Type Name Description
Span<T> span
TAction action
TStatus status
Type Parameters
Name Description
T
TAction
TStatus
| Improve this Doc View Source

PermuteRecursive<T, TAction, TGet, TSet>(Int32, Int32, TAction, TGet, TSet)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T, TAction, TGet, TSet>(int start, int end, TAction action = default(TAction), TGet get = default(TGet), TSet set = default(TSet))
    where TAction : struct, IAction where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TAction action
TGet get
TSet set
Type Parameters
Name Description
T
TAction
TGet
TSet
| Improve this Doc View Source

PermuteRecursive<T, TAction, TStatus, TGet, TSet>(Int32, Int32, TAction, TStatus, TGet, TSet)

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void PermuteRecursive<T, TAction, TStatus, TGet, TSet>(int start, int end, TAction action = default(TAction), TStatus status = default(TStatus), TGet get = default(TGet), TSet set = default(TSet))
    where TAction : struct, IAction where TStatus : struct, IFunc<StepStatus> where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TAction action
TStatus status
TGet get
TSet set
Type Parameters
Name Description
T
TAction
TStatus
TGet
TSet
| Improve this Doc View Source

Power<T>(T, T)

Powers two numeric values [a ^ b].

Declaration
public static T Power<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the power.

T b

The second operand of the power.

Returns
Type Description
T

The result of the power.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Power<T>(T, T, T, T[])

Powers multiple numeric values [a ^ b ^ c...].

Declaration
public static T Power<T>(T a, T b, T c, params T[] d)
Parameters
Type Name Description
T a

The first operand of the power.

T b

The second operand of the power.

T c

The third operand of the power.

T[] d

The remaining values of the power.

Returns
Type Description
T

The result of the power.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Power<T>(Action<Action<T>>)

Powers multiple numeric values [step_1 ^ step_2 ^ step_3...].

Declaration
public static T Power<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper containing the values.

Returns
Type Description
T

The result of the power.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Quantiles<T>(Int32, Action<Action<T>>)

Computes the quantiles of a set of data.

Declaration
public static T[] Quantiles<T>(int quantiles, Action<Action<T>> stepper)
Parameters
Type Name Description
System.Int32 quantiles

The number of quantiles to compute.

Action<Action<T>> stepper

The data stepper.

Returns
Type Description
T[]

The computed quantiles of the data set.

Type Parameters
Name Description
T

The generic data type.

| Improve this Doc View Source

Range<T>(out T, out T, Action<Action<T>>)

Gets the range (minimum and maximum) of a set of data.

Declaration
public static void Range<T>(out T minimum, out T maximum, Action<Action<T>> stepper)
Parameters
Type Name Description
T minimum

The minimum of the set of data.

T maximum

The maximum of the set of data.

Action<Action<T>> stepper

The set of data to get the range of.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Range<T>(Action<Action<T>>, out T, out T)

Gets the range (minimum and maximum) of a set of data.

Declaration
public static void Range<T>(Action<Action<T>> stepper, out T minimum, out T maximum)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of data to get the range of.

T minimum

The minimum of the set of data.

T maximum

The maximum of the set of data.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Range<T, TCompare>(ReadOnlySpan<T>, TCompare)

Finds the minimum and maximum values from a sequence of T values.

Declaration
public static ((int Index, T Value) Min, (int Index, T Value) Max) Range<T, TCompare>(ReadOnlySpan<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span

The sequence of T values to filter.

TCompare compare

The function for comparing T values.

Returns
Type Description
System.ValueTuple<System.ValueTuple<System.Int32, T>, System.ValueTuple<System.Int32, T>>
  • ( Index, T Value) Min
  • ( Index, T Value) Max
Type Parameters
Name Description
T

The type of values in the sequence.

TCompare

The type of function for comparing T values.

| Improve this Doc View Source

Remainder<T>(T, T)

Modulos two numeric values [a % b].

Declaration
public static T Remainder<T>(T a, T b)
Parameters
Type Name Description
T a

The first operand of the modulation.

T b

The second operand of the modulation.

Returns
Type Description
T

The result of the modulation.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Remainder<T>(T, T, T, T[])

Modulos multiple numeric values [a % b % c % ...].

Declaration
public static T Remainder<T>(T a, T b, T c, params T[] d)
Parameters
Type Name Description
T a

The first operand of the modulation.

T b

The second operand of the modulation.

T c

The third operand of the modulation.

T[] d

The remaining values of the modulation.

Returns
Type Description
T

The result of the modulation.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Remainder<T>(Action<Action<T>>)

Modulos multiple numeric values [step_1 % step_2 % step_3...].

Declaration
public static T Remainder<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper containing the values.

Returns
Type Description
T

The result of the modulation.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Remainder<TA, TB, TC>(TA, TB)

Remainders two values [a % b].

Declaration
public static TC Remainder<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the remainder operation [a % b].

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

Remove(String, Predicate<Char>)

Removes all the characters from a string based on a predicate.

Declaration
public static string Remove(this string string, Predicate<char> where)
Parameters
Type Name Description
System.String string

The string to remove characters from.

Predicate<System.Char> where

The predicate determining removal of each character.

Returns
Type Description
System.String

The string after removing any predicated characters.

| Improve this Doc View Source

Repeat(String, Int32)

Creates a string of a repreated string a provided number of times.

Declaration
public static string Repeat(this string string, int count)
Parameters
Type Name Description
System.String string

The string to repeat.

System.Int32 count

The number of repetitions of the string to repeat.

Returns
Type Description
System.String

The string of the repeated string to repeat.

| Improve this Doc View Source

Replace(String, (String A, String B)[])

Returns a new in which all occurrences of Unicode patterns in this instance are replaced with a relative Unicode replacements.

Declaration
public static string Replace(this string original, params (string A, string B)[] rules)
Parameters
Type Name Description
System.String original

The to perform the replacements on.

System.ValueTuple<System.String, System.String>[] rules

The patterns and relative replacements to apply to this .

Returns
Type Description
System.String

A new in which all occurrences of Unicode patterns in this instance are replaced with a relative Unicode replacements.

Remarks

Uses Regex without a timeout.

| Improve this Doc View Source

Reverse(String)

Reverses the characters in a string.

Declaration
public static string Reverse(this string string)
Parameters
Type Name Description
System.String string

The string to reverse the characters of.

Returns
Type Description
System.String

The reversed character string.

| Improve this Doc View Source

Reverse<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>)

Reverses the values in an indexed sequence.

Declaration
public static void Reverse<T>(int start, int end, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start

The starting index of the reverse.

System.Int32 end

The ending index of the reverse.

Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

Reverse<T, TGet, TSet>(Int32, Int32, TGet, TSet)

Reverses the values in an indexed sequence.

Declaration
public static void Reverse<T, TGet, TSet>(int start, int end, TGet get = default(TGet), TSet set = default(TSet))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start

The starting index of the reverse.

System.Int32 end

The ending index of the reverse.

TGet get

The get function.

TSet set

The set function.

Type Parameters
Name Description
T

The type of values to reverse.

TGet

The type of the get function.

TSet

The type of the set function.

| Improve this Doc View Source

Root<T>(T, T)

Roots two numeric values [a ^ (1 / b)].

Declaration
public static T Root<T>(T a, T b)
Parameters
Type Name Description
T a

The base of the root.

T b

The root of the operation.

Returns
Type Description
T

The result of the root.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

SearchBinary<T>(ReadOnlySpan<T>, T, Nullable<Func<T, T, CompareResult>>)

Performs a binary search on sorted indexed data.

Declaration
public static (bool Found, int Index, T Value) SearchBinary<T>(ReadOnlySpan<T> span, T element, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
ReadOnlySpan<T> span
T element
System.Nullable<Func<T, T, CompareResult>> compare
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

SearchBinary<T>(ReadOnlySpan<T>, Func<T, CompareResult>)

Performs a binary search on sorted indexed data.

Declaration
public static (bool Found, int Index, T Value) SearchBinary<T>(ReadOnlySpan<T> span, Func<T, CompareResult> sift)
Parameters
Type Name Description
ReadOnlySpan<T> span
Func<T, CompareResult> sift
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

SearchBinary<T>(Int32, Func<Int32, T>, Func<T, CompareResult>)

Performs a binary search on sorted indexed data.

Declaration
public static (bool Found, int Index, T Value) SearchBinary<T>(int length, Func<int, T> get, Func<T, CompareResult> sift)
Parameters
Type Name Description
System.Int32 length
Func<System.Int32, T> get
Func<T, CompareResult> sift
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32, T>
Type Parameters
Name Description
T
| Improve this Doc View Source

SearchBinary<T, TCompare>(ReadOnlySpan<T>, T, TCompare)

Performs a binary search on sorted indexed data.

Declaration
public static (bool Found, int Index, T Value) SearchBinary<T, TCompare>(ReadOnlySpan<T> span, T element, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
T element
TCompare compare
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32, T>
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SearchBinary<T, TSift>(ReadOnlySpan<T>, TSift)

Performs a binary search on sorted indexed data.

Declaration
public static (bool Found, int Index, T Value) SearchBinary<T, TSift>(ReadOnlySpan<T> span, TSift sift = default(TSift))
    where TSift : struct, IFunc<T, CompareResult>
Parameters
Type Name Description
ReadOnlySpan<T> span
TSift sift
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32, T>
Type Parameters
Name Description
T
TSift
| Improve this Doc View Source

SearchBinary<T, TGet, TSift>(Int32, Int32, TGet, TSift)

Performs a binary search on sorted indexed data.

Declaration
public static (bool Found, int Index, T Value) SearchBinary<T, TGet, TSift>(int index, int length, TGet get = default(TGet), TSift sift = default(TSift))
    where TGet : struct, IFunc<int, T> where TSift : struct, IFunc<T, CompareResult>
Parameters
Type Name Description
System.Int32 index
System.Int32 length
TGet get
TSift sift
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32, T>
Type Parameters
Name Description
T
TGet
TSift
| Improve this Doc View Source

SearchGraph<TNode>(TNode, IGraph<TNode>, TNode)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, IGraph<TNode> graph, TNode goal)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
TNode goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode>(TNode, IGraph<TNode>, TNode, Func<TNode, TNode, Boolean>)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, IGraph<TNode> graph, TNode goal, Func<TNode, TNode, bool> equate)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
TNode goal
Func<TNode, TNode, System.Boolean> equate
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode>(TNode, IGraph<TNode>, Statics.SearchGoal<TNode>)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, IGraph<TNode> graph, Statics.SearchGoal<TNode> goal)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchGoal<TNode> goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode>(TNode, Statics.SearchNeighbors<TNode>, TNode)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, Statics.SearchNeighbors<TNode> neighbors, TNode goal)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
TNode goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode>(TNode, Statics.SearchNeighbors<TNode>, TNode, Func<TNode, TNode, Boolean>)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, Statics.SearchNeighbors<TNode> neighbors, TNode goal, Func<TNode, TNode, bool> equate)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
TNode goal
Func<TNode, TNode, System.Boolean> equate
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchCheck<TNode>)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchCheck<TNode> check)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchCheck<TNode> check
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchGoal<TNode>)

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchGoal<TNode> goal)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchGoal<TNode> goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, IGraph<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, TNode)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, IGraph<TNode> graph, Statics.SearchHeuristic<TNode, TNumeric> heuristic, TNode goal)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchHeuristic<TNode, TNumeric> heuristic
TNode goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, IGraph<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, TNode, Func<TNode, TNode, Boolean>)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, IGraph<TNode> graph, Statics.SearchHeuristic<TNode, TNumeric> heuristic, TNode goal, Func<TNode, TNode, bool> equate)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchHeuristic<TNode, TNumeric> heuristic
TNode goal
Func<TNode, TNode, System.Boolean> equate
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, IGraph<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, TNode, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, IGraph<TNode> graph, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, TNode goal, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
TNode goal
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, IGraph<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, TNode, Func<TNode, TNode, Boolean>, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, IGraph<TNode> graph, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, TNode goal, Func<TNode, TNode, bool> equate, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
TNode goal
Func<TNode, TNode, System.Boolean> equate
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, IGraph<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, Statics.SearchGoal<TNode>, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, IGraph<TNode> graph, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, Statics.SearchGoal<TNode> goal, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
Statics.SearchGoal<TNode> goal
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, IGraph<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchGoal<TNode>)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, IGraph<TNode> graph, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchGoal<TNode> goal)
Parameters
Type Name Description
TNode start
IGraph<TNode> graph
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchGoal<TNode> goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, TNode)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, TNode goal)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
TNode goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, TNode, Func<TNode, TNode, Boolean>)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, TNode goal, Func<TNode, TNode, bool> equate)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
TNode goal
Func<TNode, TNode, System.Boolean> equate
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCheck<TNode>)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCheck<TNode> check)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCheck<TNode> check
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, TNode, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, TNode goal, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
TNode goal
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, TNode, Func<TNode, TNode, Boolean>, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, TNode goal, Func<TNode, TNode, bool> equate, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
TNode goal
Func<TNode, TNode, System.Boolean> equate
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, Statics.SearchCheck<TNode>, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, Statics.SearchCheck<TNode> check, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
Statics.SearchCheck<TNode> check
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchCost<TNode, TNumeric>, Statics.SearchGoal<TNode>, out TNumeric)

Runs the A* search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchCost<TNode, TNumeric> cost, Statics.SearchGoal<TNode> goal, out TNumeric totalCost)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchCost<TNode, TNumeric> cost
Statics.SearchGoal<TNode> goal
TNumeric totalCost
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SearchGraph<TNode, TNumeric>(TNode, Statics.SearchNeighbors<TNode>, Statics.SearchHeuristic<TNode, TNumeric>, Statics.SearchGoal<TNode>)

Runs the Dijkstra search algorithm on a graph.

Declaration
public static Action<Action<TNode>>? SearchGraph<TNode, TNumeric>(TNode start, Statics.SearchNeighbors<TNode> neighbors, Statics.SearchHeuristic<TNode, TNumeric> heuristic, Statics.SearchGoal<TNode> goal)
Parameters
Type Name Description
TNode start
Statics.SearchNeighbors<TNode> neighbors
Statics.SearchHeuristic<TNode, TNumeric> heuristic
Statics.SearchGoal<TNode> goal
Returns
Type Description
System.Nullable<Action<Action<TNode>>>
Type Parameters
Name Description
TNode
TNumeric
| Improve this Doc View Source

SecantQuadratic<T>(Angle<T>)

Estimates the secant ratio using piecewise quadratic equations. Fast but NOT very accurate.

Declaration
public static T SecantQuadratic<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the quadratic estimated secant ratio of.

Returns
Type Description
T

The quadratic estimation of the secant ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

SecantSystem<T>(Angle<T>)

Computes the secant ratio of an angle using the system's cosine function. WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

Declaration
public static T SecantSystem<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the secant ratio of.

Returns
Type Description
T

The secant ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

Remarks

WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

| Improve this Doc View Source

Select<T>(Range, Func<Int32, T>)

Projects each element of a sequence into a new form.

Declaration
public static System.Collections.Generic.IEnumerable<T> Select<T>(this Range range, Func<int, T> select)
Parameters
Type Name Description
Range range

A sequence of values to invoke a transform function on.

Func<System.Int32, T> select
Returns
Type Description
System.Collections.Generic.IEnumerable<T>

An whose elements are the result of invoking the transform function on each element of source.

Type Parameters
Name Description
T
| Improve this Doc View Source

Select<T, TSelect>(Range, TSelect)

Projects each element of a sequence into a new form.

Declaration
public static System.Collections.Generic.IEnumerable<T> Select<T, TSelect>(this Range range, TSelect select = default(TSelect))
    where TSelect : struct, IFunc<int, T>
Parameters
Type Name Description
Range range

A sequence of values to invoke a transform function on.

TSelect select

The function for selecting a T based on an .

Returns
Type Description
System.Collections.Generic.IEnumerable<T>

An whose elements are the result of invoking the transform function on each element of source.

Type Parameters
Name Description
T

The type of the value returned by selector.

TSelect

The type of function for selecting a T based on an .

| Improve this Doc View Source

Shuffle<T>(Span<T>, Nullable<Random>)

Sorts values into a randomized order.
Runtime: O(n)
Memory: O(1)

Declaration
public static void Shuffle<T>(Span<T> span, Random? random = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Random> random
Type Parameters
Name Description
T
| Improve this Doc View Source

Shuffle<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Random>)

Sorts values into a randomized order.
Runtime: O(n)
Memory: O(1)

Declaration
public static void Shuffle<T>(int start, int end, Func<int, T> get, Action<int, T> set, Random? random = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Random> random
Type Parameters
Name Description
T
| Improve this Doc View Source

Shuffle<T, TRandom>(Span<T>, TRandom)

Sorts values into a randomized order.
Runtime: O(n)
Memory: O(1)

Declaration
public static void Shuffle<T, TRandom>(Span<T> span, TRandom random = default(TRandom))
    where TRandom : struct, IFunc<int, int, int>
Parameters
Type Name Description
Span<T> span
TRandom random
Type Parameters
Name Description
T
TRandom
| Improve this Doc View Source

Shuffle<T, TGet, TSet>(Int32, Int32, TGet, TSet, Nullable<Random>)

Sorts values into a randomized order.
Runtime: O(n)
Memory: O(1)

Declaration
public static void Shuffle<T, TGet, TSet>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), Random? random = null)
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
System.Nullable<Random> random
Type Parameters
Name Description
T
TGet
TSet
| Improve this Doc View Source

Shuffle<T, TGet, TSet, TRandom>(Int32, Int32, TGet, TSet, TRandom)

Sorts values into a randomized order.
Runtime: O(n)
Memory: O(1)

Declaration
public static void Shuffle<T, TGet, TSet, TRandom>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TRandom random = default(TRandom))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TRandom : struct, IFunc<int, int, int>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TRandom random
Type Parameters
Name Description
T
TGet
TSet
TRandom
| Improve this Doc View Source

SineQuadratic<T>(Angle<T>)

Estimates the sine ratio using piecewise quadratic equations. Fast but NOT very accurate.

Declaration
public static T SineQuadratic<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the quadratic estimated sine ratio of.

Returns
Type Description
T

The quadratic estimation of the sine ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

SineSystem<T>(Angle<T>)

Computes the sine ratio of an angle using the system's sine function. WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

Declaration
public static T SineSystem<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the sine ratio of.

Returns
Type Description
T

The sine ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

Remarks

WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

| Improve this Doc View Source

SineTaylorSeries<T>(Angle<T>, Nullable<Predicate<T>>)

Computes the sine ratio of an angle using the relative talor series. Accurate but slow.

Declaration
public static T SineTaylorSeries<T>(Angle<T> a, Predicate<T>? predicate = null)
Parameters
Type Name Description
Angle<T> a

The angle to compute the sine ratio of.

System.Nullable<Predicate<T>> predicate

Determines if coputation should continue or is accurate enough.

Returns
Type Description
T

The taylor series computed sine ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

SortBogo<T>(Span<T>, Nullable<Func<T, T, CompareResult>>, Nullable<Random>)

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void SortBogo<T>(Span<T> span, Func<T, T, CompareResult>? compare = null, Random? random = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
System.Nullable<Random> random
Type Parameters
Name Description
T
| Improve this Doc View Source

SortBogo<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>, Nullable<Random>)

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void SortBogo<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null, Random? random = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
System.Nullable<Random> random
Type Parameters
Name Description
T
| Improve this Doc View Source

SortBogo<T, TCompare>(Span<T>, TCompare, Nullable<Random>)

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void SortBogo<T, TCompare>(Span<T> span, TCompare compare = default(TCompare), Random? random = null)
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
System.Nullable<Random> random
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortBogo<T, TCompare, TRandom>(Span<T>, TCompare, TRandom)

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void SortBogo<T, TCompare, TRandom>(Span<T> span, TCompare compare = default(TCompare), TRandom random = default(TRandom))
    where TCompare : struct, IFunc<T, T, CompareResult> where TRandom : struct, IFunc<int, int, int>
Parameters
Type Name Description
Span<T> span
TCompare compare
TRandom random
Type Parameters
Name Description
T
TCompare
TRandom
| Improve this Doc View Source

SortBogo<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare, Nullable<Random>)

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void SortBogo<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare), Random? random = null)
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
System.Nullable<Random> random
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortBogo<T, TGet, TSet, TCompare, TRandom>(Int32, Int32, TGet, TSet, TCompare, TRandom)

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void SortBogo<T, TGet, TSet, TCompare, TRandom>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare), TRandom random = default(TRandom))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult> where TRandom : struct, IFunc<int, int, int>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
TRandom random
Type Parameters
Name Description
T
TGet
TSet
TCompare
TRandom
| Improve this Doc View Source

SortBubble<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the bubble sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortBubble<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortBubble<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the bubble sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortBubble<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortBubble<T, TCompare>(Span<T>, TCompare)

Sorts values using the bubble sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortBubble<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortBubble<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the bubble sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortBubble<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortCocktail<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the cocktail sort algorithm.

Declaration
public static void SortCocktail<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortCocktail<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the cocktail sort algorithm.

Declaration
public static void SortCocktail<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortCocktail<T, TCompare>(Span<T>, TCompare)

Sorts values using the cocktail sort algorithm.

Declaration
public static void SortCocktail<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortCocktail<T, TGet, TSet, TCompare>(Int32, Int32, TCompare, TGet, TSet)

Sorts values using the cocktail sort algorithm.

Declaration
public static void SortCocktail<T, TGet, TSet, TCompare>(int start, int end, TCompare compare = default(TCompare), TGet get = default(TGet), TSet set = default(TSet))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TCompare compare
TGet get
TSet set
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortComb<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the comb sort algorithm.

Declaration
public static void SortComb<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortComb<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the comb sort algorithm.

Declaration
public static void SortComb<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortComb<T, TCompare>(Span<T>, TCompare)

Sorts values using the comb sort algorithm.

Declaration
public static void SortComb<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortComb<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the comb sort algorithm.

Declaration
public static void SortComb<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortCounting(Span<UInt32>)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(span)))
Memory: Θ(Max(select(span)))
Stable: True

Declaration
public static void SortCounting(Span<uint> span)
Parameters
Type Name Description
Span<System.UInt32> span
| Improve this Doc View Source

SortCounting(Int32, Int32, Func<Int32, UInt32>, Action<Int32, UInt32>)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(n)))
Memory: Θ(Max(select(n)))
Stable: True

Declaration
public static void SortCounting(int start, int end, Func<int, uint> get, Action<int, uint> set)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, System.UInt32> get
Action<System.Int32, System.UInt32> set
| Improve this Doc View Source

SortCounting<T>(Span<T>, Func<T, UInt32>)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(span)))
Memory: Θ(Max(select(span)))
Stable: True

Declaration
public static void SortCounting<T>(Span<T> span, Func<T, uint> select)
Parameters
Type Name Description
Span<T> span

The span to be sorted.

Func<T, System.UInt32> select
Type Parameters
Name Description
T
| Improve this Doc View Source

SortCounting<T>(Int32, Int32, Func<T, UInt32>, Func<Int32, T>, Action<Int32, T>)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(n)))
Memory: Θ(Max(select(n)))
Stable: True

Declaration
public static void SortCounting<T>(int start, int end, Func<T, uint> select, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start

The starting index of the sort.

System.Int32 end

The ending index of the sort.

Func<T, System.UInt32> select
Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

SortCounting<T, TSelect>(Span<T>, TSelect)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(span)))
Memory: Θ(Max(select(span)))
Stable: True

Declaration
public static void SortCounting<T, TSelect>(Span<T> span, TSelect select = default(TSelect))
    where TSelect : struct, IFunc<T, uint>
Parameters
Type Name Description
Span<T> span

The span to be sorted.

TSelect select

The method for selecting values from T values.

Type Parameters
Name Description
T

The type of values to sort.

TSelect

The type of method for selecting an values from T values.

| Improve this Doc View Source

SortCounting<TGet, TSet>(Int32, Int32, TGet, TSet)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(n)))
Memory: Θ(Max(select(n)))
Stable: True

Declaration
public static void SortCounting<TGet, TSet>(int start, int end, TGet get = default(TGet), TSet set = default(TSet))
    where TGet : struct, IFunc<int, uint> where TSet : struct, IAction<int, uint>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
Type Parameters
Name Description
TGet
TSet
| Improve this Doc View Source

SortCounting<T, TSelect, TGet, TSet>(Int32, Int32, TSelect, TGet, TSet)

Sorts values using the counting sort algorithm.
Runtime: Θ(Max(select(n)))
Memory: Θ(Max(select(n)))
Stable: True

Declaration
public static void SortCounting<T, TSelect, TGet, TSet>(int start, int end, TSelect select = default(TSelect), TGet get = default(TGet), TSet set = default(TSet))
    where TSelect : struct, IFunc<T, uint> where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start

The starting index of the sort.

System.Int32 end

The ending index of the sort.

TSelect select

The method for selecting values from T values.

TGet get

The get function.

TSet set

The set function.

Type Parameters
Name Description
T

The type of values to sort.

TSelect

The type of method for selecting an values from T values.

TGet

The type of get function.

TSet

The type of set function.

| Improve this Doc View Source

SortCycle<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the cycle algorithm.

Declaration
public static void SortCycle<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortCycle<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the cycle algorithm.

Declaration
public static void SortCycle<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortCycle<T, TCompare>(Span<T>, TCompare)

Sorts values using the cycle algorithm.

Declaration
public static void SortCycle<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortCycle<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the cycle algorithm.

Declaration
public static void SortCycle<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortGnome<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the gnome sort algorithm.

Declaration
public static void SortGnome<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortGnome<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the gnome sort algorithm.

Declaration
public static void SortGnome<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortGnome<T, TCompare>(Span<T>, TCompare)

Sorts values using the gnome sort algorithm.

Declaration
public static void SortGnome<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortGnome<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the gnome sort algorithm.

Declaration
public static void SortGnome<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortHeap<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the heap sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortHeap<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortHeap<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the heap sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortHeap<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortHeap<T, TCompare>(Span<T>, TCompare)

Sorts values using the heap sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortHeap<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortHeap<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the heap sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortHeap<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortInsertion<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the insertion sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortInsertion<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortInsertion<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the insertion sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortInsertion<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortInsertion<T, TCompare>(Span<T>, TCompare)

Sorts values using the insertion sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortInsertion<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortInsertion<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the insertion sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortInsertion<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortIntro<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the introspective sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: False

Declaration
public static void SortIntro<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortIntro<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the introspective sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: False

Declaration
public static void SortIntro<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortIntro<T, TCompare>(Span<T>, TCompare)

Sorts values using the introspective sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: False

Declaration
public static void SortIntro<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortIntro<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the introspective sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: False

Declaration
public static void SortIntro<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortMerge<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the merge sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: True

Declaration
public static void SortMerge<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortMerge<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the merge sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: True

Declaration
public static void SortMerge<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortMerge<T, TCompare>(Span<T>, TCompare)

Sorts values using the merge sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: True

Declaration
public static void SortMerge<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortMerge<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the merge sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: True

Declaration
public static void SortMerge<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortOddEven<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the odd even sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortOddEven<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortOddEven<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the odd even sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortOddEven<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortOddEven<T, TCompare>(Span<T>, TCompare)

Sorts values using the odd even sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortOddEven<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortOddEven<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the odd even sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void SortOddEven<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortPancake<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the pancake algorithm.

Declaration
public static void SortPancake<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortPancake<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the pancake algorithm.

Declaration
public static void SortPancake<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortPancake<T, TCompare>(Span<T>, TCompare)

Sorts values using the pancake algorithm.

Declaration
public static void SortPancake<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortPancake<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the pancake algorithm.

Declaration
public static void SortPancake<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortPidgeonHole(Span<Int32>)

Sorts values using the pidgeon hole sort algorithm.

Declaration
public static void SortPidgeonHole(Span<int> span)
Parameters
Type Name Description
Span<System.Int32> span

The span to be sorted.

| Improve this Doc View Source

SortPidgeonHole(Int32, Int32, Func<Int32, Int32>, Action<Int32, Int32>)

Sorts values using the pidgeon hole sort algorithm.

Declaration
public static void SortPidgeonHole(int start, int end, Func<int, int> get, Action<int, int> set)
Parameters
Type Name Description
System.Int32 start

The starting index of the sort.

System.Int32 end

The ending index of the sort.

Func<System.Int32, System.Int32> get
Action<System.Int32, System.Int32> set
| Improve this Doc View Source

SortPidgeonHole<TGet, TSet>(Int32, Int32, TGet, TSet)

Sorts values using the pidgeon hole sort algorithm.

Declaration
public static void SortPidgeonHole<TGet, TSet>(int start, int end, TGet get = default(TGet), TSet set = default(TSet))
    where TGet : struct, IFunc<int, int> where TSet : struct, IAction<int, int>
Parameters
Type Name Description
System.Int32 start

The starting index of the sort.

System.Int32 end

The ending index of the sort.

TGet get

The get function.

TSet set

The set function.

Type Parameters
Name Description
TGet

The type of get function.

TSet

The type of set function.

| Improve this Doc View Source

SortQuick<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the quick sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: ln(n)
Stable: False

Declaration
public static void SortQuick<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortQuick<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the quick sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: ln(n)
Stable: False

Declaration
public static void SortQuick<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortQuick<T, TCompare>(Span<T>, TCompare)

Sorts values using the quick sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: ln(n)
Stable: False

Declaration
public static void SortQuick<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortQuick<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the quick sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: ln(n)
Stable: False

Declaration
public static void SortQuick<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortRadix(Span<UInt32>)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix(Span<uint> span)
Parameters
Type Name Description
Span<System.UInt32> span
| Improve this Doc View Source

SortRadix(Int32, Int32, Func<Int32, UInt32>, Action<Int32, UInt32>)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix(int start, int end, Func<int, uint> get, Action<int, uint> set)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, System.UInt32> get
Action<System.Int32, System.UInt32> set
| Improve this Doc View Source

SortRadix<T>(Span<T>, Func<T, UInt32>)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix<T>(Span<T> span, Func<T, uint> select)
Parameters
Type Name Description
Span<T> span

The span to be sorted.

Func<T, System.UInt32> select
Type Parameters
Name Description
T
| Improve this Doc View Source

SortRadix<T>(Int32, Int32, Func<T, UInt32>, Func<Int32, T>, Action<Int32, T>)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix<T>(int start, int end, Func<T, uint> select, Func<int, T> get, Action<int, T> set)
Parameters
Type Name Description
System.Int32 start

The starting index of the sort.

System.Int32 end

The ending index of the sort.

Func<T, System.UInt32> select
Func<System.Int32, T> get
Action<System.Int32, T> set
Type Parameters
Name Description
T
| Improve this Doc View Source

SortRadix<T, TSelect>(Span<T>, TSelect)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix<T, TSelect>(Span<T> span, TSelect select = default(TSelect))
    where TSelect : struct, IFunc<T, uint>
Parameters
Type Name Description
Span<T> span

The span to be sorted.

TSelect select

The method for selecting values from T values.

Type Parameters
Name Description
T

The type of values to sort.

TSelect

The type of method for selecting an values from T values.

| Improve this Doc View Source

SortRadix<TGet, TSet>(Int32, Int32, TGet, TSet)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix<TGet, TSet>(int start, int end, TGet get = default(TGet), TSet set = default(TSet))
    where TGet : struct, IFunc<int, uint> where TSet : struct, IAction<int, uint>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
Type Parameters
Name Description
TGet
TSet
| Improve this Doc View Source

SortRadix<T, TSelect, TGet, TSet>(Int32, Int32, TSelect, TGet, TSet)

Sorts values using the radix sort algorithm.

Declaration
public static void SortRadix<T, TSelect, TGet, TSet>(int start, int end, TSelect select = default(TSelect), TGet get = default(TGet), TSet set = default(TSet))
    where TSelect : struct, IFunc<T, uint> where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 start

The starting index of the sort.

System.Int32 end

The ending index of the sort.

TSelect select

The method for selecting values from T values.

TGet get

The get function.

TSet set

The set function.

Type Parameters
Name Description
T

The type of values to sort.

TSelect

The type of method for selecting an values from T values.

TGet

The type of get function.

TSet

The type of set function.

| Improve this Doc View Source

SortSelection<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the selection sort algoritm.
Runtime: Ω(n^2), ε(n^2), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortSelection<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortSelection<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the selection sort algoritm.
Runtime: Ω(n^2), ε(n^2), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortSelection<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortSelection<T, TCompare>(Span<T>, TCompare)

Sorts values using the selection sort algoritm.
Runtime: Ω(n^2), ε(n^2), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortSelection<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortSelection<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the selection sort algoritm.
Runtime: Ω(n^2), ε(n^2), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortSelection<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortShell<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the shell sort algorithm.

Declaration
public static void SortShell<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortShell<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the shell sort algorithm.

Declaration
public static void SortShell<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortShell<T, TCompare>(Span<T>, TCompare)

Sorts values using the shell sort algorithm.

Declaration
public static void SortShell<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortShell<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the shell sort algorithm.

Declaration
public static void SortShell<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortSlow<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the slow sort algorithm.

Declaration
public static void SortSlow<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortSlow<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the slow sort algorithm.

Declaration
public static void SortSlow<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortSlow<T, TCompare>(Span<T>, TCompare)

Sorts values using the slow sort algorithm.

Declaration
public static void SortSlow<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortSlow<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the slow sort algorithm.

Declaration
public static void SortSlow<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortStooge<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the stooge algorithm.

Declaration
public static void SortStooge<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortStooge<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the stooge algorithm.

Declaration
public static void SortStooge<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortStooge<T, TCompare>(Span<T>, TCompare)

Sorts values using the stooge algorithm.

Declaration
public static void SortStooge<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortStooge<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the pancake algorithm.

Declaration
public static void SortStooge<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

SortTim<T>(Span<T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the Tim sort algorithm.
Runtime: Ω(n), ε(nln(n)), O(nln(n))
Memory: O(n)
Stable: True

Declaration
public static void SortTim<T>(Span<T> span, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
Span<T> span
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortTim<T>(Int32, Int32, Func<Int32, T>, Action<Int32, T>, Nullable<Func<T, T, CompareResult>>)

Sorts values using the heap sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void SortTim<T>(int start, int end, Func<int, T> get, Action<int, T> set, Func<T, T, CompareResult>? compare = null)
Parameters
Type Name Description
System.Int32 start
System.Int32 end
Func<System.Int32, T> get
Action<System.Int32, T> set
System.Nullable<Func<T, T, CompareResult>> compare
Type Parameters
Name Description
T
| Improve this Doc View Source

SortTim<T, TCompare>(Span<T>, TCompare)

Sorts values using the Tim sort algorithm.
Runtime: Ω(n), ε(nln(n)), O(nln(n))
Memory: O(n)
Stable: True

Declaration
public static void SortTim<T, TCompare>(Span<T> span, TCompare compare = default(TCompare))
    where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
Span<T> span
TCompare compare
Type Parameters
Name Description
T
TCompare
| Improve this Doc View Source

SortTim<T, TGet, TSet, TCompare>(Int32, Int32, TGet, TSet, TCompare)

Sorts values using the Tim sort algorithm.
Runtime: Ω(n), ε(nln(n)), O(nln(n))
Memory: O(n)
Stable: True

Declaration
public static void SortTim<T, TGet, TSet, TCompare>(int start, int end, TGet get = default(TGet), TSet set = default(TSet), TCompare compare = default(TCompare))
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T> where TCompare : struct, IFunc<T, T, CompareResult>
Parameters
Type Name Description
System.Int32 start
System.Int32 end
TGet get
TSet set
TCompare compare
Type Parameters
Name Description
T
TGet
TSet
TCompare
| Improve this Doc View Source

sourcedirectory(String)

Gets the directory path of the current location in source code.

Declaration
public static string? sourcedirectory(string default = null)
Parameters
Type Name Description
System.String default

Intended to leave default. This value is set by the compiler via .

Returns
Type Description
System.Nullable<System.String>

The directory path of the current location in source code.

| Improve this Doc View Source

sourcefilepath(String)

Gets the file path of the current location in source code.

Declaration
public static string sourcefilepath(string default = null)
Parameters
Type Name Description
System.String default

Intended to leave default. This value is set by the compiler via .

Returns
Type Description
System.String

The file path of the current location in source code.

| Improve this Doc View Source

sourcelinenumber(Int32)

Gets the line number of the current location in source code.

Declaration
public static int sourcelinenumber(int default = null)
Parameters
Type Name Description
System.Int32 default

Intended to leave default. This value is set by the compiler via .

Returns
Type Description
System.Int32

The line number of the current location in source code.

| Improve this Doc View Source

sourcemembername(String)

Gets the member name of the current location in source code.

Declaration
public static string sourcemembername(string default = null)
Parameters
Type Name Description
System.String default

Intended to leave default. This value is set by the compiler via .

Returns
Type Description
System.String

The member name of the current location in source code.

| Improve this Doc View Source

sourceof<T>(T, Nullable<String>)

Gets the source code and evaluation of an expression.

Declaration
public static (T Value, string Source) sourceof<T>(T expression, string? default = null)
Parameters
Type Name Description
T expression

The expression to evaluate and get the source of.

System.Nullable<System.String> default

Intended to leave default. This value is set by the compiler via .

Returns
Type Description
System.ValueTuple<T, System.String>

The source code and evaluation of the expression.

Type Parameters
Name Description
T

The type the expression will evaluate to.

| Improve this Doc View Source

sourceof<T>(T, out String, Nullable<String>)

Gets the source code and evaluation of an expression.

Declaration
public static T sourceof<T>(T expression, out string source, string? default = null)
Parameters
Type Name Description
T expression

The expression to evaluate and get the source of.

System.String source

The source code of the expression.

System.Nullable<System.String> default

Intended to leave default. This value is set by the compiler via .

Returns
Type Description
T

The evaluation of the expression.

Type Parameters
Name Description
T

The type the expression will evaluate to.

| Improve this Doc View Source

SplitLines(String)

Splits the string into the individual lines.

Declaration
public static string[] SplitLines(this string string)
Parameters
Type Name Description
System.String string

The string to get the lines of.

Returns
Type Description
System.String[]

an array of the individual lines of the string.

| Improve this Doc View Source

SquareRoot<T>(T)

Square roots a numeric value [√a].

Declaration
public static T SquareRoot<T>(T a)
Parameters
Type Name Description
T a

The numeric value to square root.

Returns
Type Description
T

The result of the square root.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

StandardDeviation<T>(Action<Action<T>>)

Computes the standard deviation of a set of numbers.

Declaration
public static T StandardDeviation<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of numbers to compute the standard deviation of.

Returns
Type Description
T

The computed standard deviation of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

Stepper<T>(T[], Action<T>)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T>(this T[] array, Action<T> step)
Parameters
Type Name Description
T[] array
Action<T> step
Type Parameters
Name Description
T
| Improve this Doc View Source

Stepper<T>(T[], Int32, Int32, Action<T>)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T>(this T[] array, int start, int end, Action<T> step)
Parameters
Type Name Description
T[] array
System.Int32 start
System.Int32 end
Action<T> step
Type Parameters
Name Description
T
| Improve this Doc View Source

Stepper<T>(T[], Int32, Int32, Func<T, StepStatus>)

Performs a method on every value in a sequence.

Declaration
public static StepStatus Stepper<T>(this T[] array, int start, int end, Func<T, StepStatus> step)
Parameters
Type Name Description
T[] array
System.Int32 start
System.Int32 end
Func<T, StepStatus> step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
| Improve this Doc View Source

Stepper<T>(ReadOnlySpan<T>, Action<T>)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T>(this ReadOnlySpan<T> span, Action<T> step)
Parameters
Type Name Description
ReadOnlySpan<T> span
Action<T> step
Type Parameters
Name Description
T
| Improve this Doc View Source

Stepper<T>(ReadOnlySpan<T>, Int32, Int32, Action<T>)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T>(this ReadOnlySpan<T> span, int start, int end, Action<T> step)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Int32 start
System.Int32 end
Action<T> step
Type Parameters
Name Description
T
| Improve this Doc View Source

Stepper<T>(ReadOnlySpan<T>, Int32, Int32, Func<T, StepStatus>)

Performs a method on every value in a sequence.

Declaration
public static StepStatus Stepper<T>(this ReadOnlySpan<T> span, int start, int end, Func<T, StepStatus> step)
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Int32 start
System.Int32 end
Func<T, StepStatus> step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
| Improve this Doc View Source

Stepper<T, TStep>(T[], TStep)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T, TStep>(this T[] array, TStep step = default(TStep))
    where TStep : struct, IAction<T>
Parameters
Type Name Description
T[] array
TStep step
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

Stepper<T, TStep>(T[], Int32, Int32, TStep)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T, TStep>(this T[] array, int start, int end, TStep step = default(TStep))
    where TStep : struct, IAction<T>
Parameters
Type Name Description
T[] array
System.Int32 start
System.Int32 end
TStep step
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

Stepper<T, TStep>(ReadOnlySpan<T>, TStep)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T, TStep>(this ReadOnlySpan<T> span, TStep step = default(TStep))
    where TStep : struct, IAction<T>
Parameters
Type Name Description
ReadOnlySpan<T> span
TStep step
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

Stepper<T, TStep>(ReadOnlySpan<T>, Int32, Int32, TStep)

Performs a method on every value in a sequence.

Declaration
public static void Stepper<T, TStep>(this ReadOnlySpan<T> span, int start, int end, TStep step = default(TStep))
    where TStep : struct, IAction<T>
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Int32 start
System.Int32 end
TStep step
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

StepperBreak<T>(T[], Func<T, StepStatus>)

Performs a method on every value in a sequence.

Declaration
public static StepStatus StepperBreak<T>(this T[] array, Func<T, StepStatus> step)
Parameters
Type Name Description
T[] array
Func<T, StepStatus> step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
| Improve this Doc View Source

StepperBreak<T>(ReadOnlySpan<T>, Func<T, StepStatus>)

Performs a method on every value in a sequence.

Declaration
public static StepStatus StepperBreak<T>(this ReadOnlySpan<T> span, Func<T, StepStatus> step)
Parameters
Type Name Description
ReadOnlySpan<T> span
Func<T, StepStatus> step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
| Improve this Doc View Source

StepperBreak<T, TStep>(T[], TStep)

Performs a method on every value in a sequence.

Declaration
public static StepStatus StepperBreak<T, TStep>(this T[] array, TStep step = default(TStep))
    where TStep : struct, IFunc<T, StepStatus>
Parameters
Type Name Description
T[] array
TStep step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

StepperBreak<T, TStep>(T[], Int32, Int32, TStep)

Performs a method on every value in a sequence.

Declaration
public static StepStatus StepperBreak<T, TStep>(this T[] array, int start, int end, TStep step = default(TStep))
    where TStep : struct, IFunc<T, StepStatus>
Parameters
Type Name Description
T[] array
System.Int32 start
System.Int32 end
TStep step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

StepperBreak<T, TStep>(ReadOnlySpan<T>, TStep)

Performs a method on every value in a sequence.

Declaration
public static StepStatus StepperBreak<T, TStep>(this ReadOnlySpan<T> span, TStep step = default(TStep))
    where TStep : struct, IFunc<T, StepStatus>
Parameters
Type Name Description
ReadOnlySpan<T> span
TStep step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

StepperBreak<T, TStep>(ReadOnlySpan<T>, Int32, Int32, TStep)

Performs a method on every value in a sequence.

Declaration
public static StepStatus StepperBreak<T, TStep>(this ReadOnlySpan<T> span, int start, int end, TStep step = default(TStep))
    where TStep : struct, IFunc<T, StepStatus>
Parameters
Type Name Description
ReadOnlySpan<T> span
System.Int32 start
System.Int32 end
TStep step
Returns
Type Description
StepStatus
Type Parameters
Name Description
T
TStep
| Improve this Doc View Source

Subtraction<T>(T, T)

Subtracts two values [a - b].

Declaration
public static T Subtraction<T>(T a, T b)
Parameters
Type Name Description
T a

The left operand.

T b

The right operand.

Returns
Type Description
T

The result of the subtraction [a - b].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Subtraction<T>(T, T, T, T[])

Subtracts multiple values [a - b - c - ...].

Declaration
public static T Subtraction<T>(T a, T b, T c, params T[] d)
Parameters
Type Name Description
T a

The first operand.

T b

The second operand.

T c

The third operand.

T[] d

The remaining values.

Returns
Type Description
T

The result of the subtraction [a - b - c - ...].

Type Parameters
Name Description
T

The type of the operation.

| Improve this Doc View Source

Subtraction<T>(Action<Action<T>>)

Subtracts multiple numeric values [step1 - step2 - step3 - ...].

Declaration
public static T Subtraction<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper containing the values.

Returns
Type Description
T

The result of the subtraction [step1 - step2 - step3 - ...].

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Subtraction<TA, TB, TC>(TA, TB)

Subtracts two values [a - b].

Declaration
public static TC Subtraction<TA, TB, TC>(TA a, TB b)
Parameters
Type Name Description
TA a

The left operand.

TB b

The right operand.

Returns
Type Description
TC

The result of the subtraction [a - b].

Type Parameters
Name Description
TA

The type of the left operand.

TB

The type of the right operand.

TC

The type of the return.

| Improve this Doc View Source

Swap<T>(ref T, ref T)

Swaps two values.

Declaration
public static void Swap<T>(ref T a, ref T b)
Parameters
Type Name Description
T a

The first value of the swap.

T b

The second value of the swap.

Type Parameters
Name Description
T

The type of values to swap.

| Improve this Doc View Source

Swap<T, TGet, TSet>(Int32, Int32, TGet, TSet)

Swaps two values.

Declaration
public static void Swap<T, TGet, TSet>(int a, int b, TGet get, TSet set)
    where TGet : struct, IFunc<int, T> where TSet : struct, IAction<int, T>
Parameters
Type Name Description
System.Int32 a

The index of the first value to swap.

System.Int32 b

The index of the second value to swap.

TGet get

The the get method.

TSet set

The the set method.

Type Parameters
Name Description
T

The type of values to swap.

TGet

The type of the get method.

TSet

The type of the set method.

| Improve this Doc View Source

Switch((Statics.SwitchSyntax.Condition, Action)[])

Syntax sugar Switch statements.

Declaration
public static void Switch(params (Statics.SwitchSyntax.Condition, Action)[] possibleActions)
Parameters
Type Name Description
System.ValueTuple<Statics.SwitchSyntax.Condition, Action>[] possibleActions

The possible actions of the Switch statement.

| Improve this Doc View Source

Switch<T>(T)

Syntax sugar Switch statements.

Declaration
public static Statics.SwitchSyntax.ParamsAction<Statics.SwitchSyntax.Condition<T>, Action> Switch<T>(T value)
Parameters
Type Name Description
T value

The value argument of the Switch statement.

Returns
Type Description
Statics.SwitchSyntax.ParamsAction<Statics.SwitchSyntax.Condition<T>, Action>

The delegate for the Switch statement.

Type Parameters
Name Description
T

The generic type parameter to the Switch statement.

| Improve this Doc View Source

TangentQuadratic<T>(Angle<T>)

Estimates the tangent ratio using piecewise quadratic equations. Fast but NOT very accurate.

Declaration
public static T TangentQuadratic<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the quadratic estimated tangent ratio of.

Returns
Type Description
T

The quadratic estimation of the tangent ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

TangentSystem<T>(Angle<T>)

Computes the tangent ratio of an angle using the system's tangent function. WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

Declaration
public static T TangentSystem<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the tangent ratio of.

Returns
Type Description
T

The tangent ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

Remarks

WARNING! CONVERSION TO/FROM DOUBLE (possible loss of significant figures).

| Improve this Doc View Source

TangentTaylorSeries<T>(Angle<T>)

Computes the tangent ratio of an angle using the relative talor series. Accurate but slow.

Declaration
public static T TangentTaylorSeries<T>(Angle<T> a)
Parameters
Type Name Description
Angle<T> a

The angle to compute the tangent ratio of.

Returns
Type Description
T

The taylor series computed tangent ratio of the provided angle.

Type Parameters
Name Description
T

The numeric type of the operation.

| Improve this Doc View Source

Time_DateTime(Action)

Times an action using System.DateTime.

Declaration
public static TimeSpan Time_DateTime(this Action action)
Parameters
Type Name Description
Action action

The action to time.

Returns
Type Description
TimeSpan

The TimeSpan the action took to complete.

| Improve this Doc View Source

Time_StopWatch(Action)

Times an action using System.Diagnostics.Stopwatch.

Declaration
public static TimeSpan Time_StopWatch(this Action action)
Parameters
Type Name Description
Action action

The action to time.

Returns
Type Description
TimeSpan

The TimeSpan the action took to complete.

| Improve this Doc View Source

ToArray(Range)

Converts a range to a to an array of values.

Declaration
public static int[] ToArray(this Range range)
Parameters
Type Name Description
Range range
Returns
Type Description
System.Int32[]

An array of the values of the range.

| Improve this Doc View Source

ToArray<T>(Action<Action<T>>)

Converts the stepper into an array.

Declaration
public static T[] ToArray<T>(this Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper to convert.

Returns
Type Description
T[]

The array created from the stepper.

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

ToArray<T>(Range, Func<Int32, T>)

Converts a range to a to an array of values.

Declaration
public static T[] ToArray<T>(this Range range, Func<int, T> select)
Parameters
Type Name Description
Range range

The range of values to convert into an array.

Func<System.Int32, T> select
Returns
Type Description
T[]

An array of the values of the range.

Type Parameters
Name Description
T
| Improve this Doc View Source

ToArray<T, TSelect>(Range, TSelect)

Converts a range to a to an array of values.

Declaration
public static T[] ToArray<T, TSelect>(this Range range, TSelect select = default(TSelect))
    where TSelect : struct, IFunc<int, T>
Parameters
Type Name Description
Range range

The range of values to convert into an array.

TSelect select

The method for selecting a T based on an .

Returns
Type Description
T[]

An array of the values of the range.

Type Parameters
Name Description
T

The resulting element type of the array.

TSelect

The type of method for selecting a T based on an .

| Improve this Doc View Source

ToCompareResult(Int32)

Converts an to the relative CompareResult.

Declaration
public static CompareResult ToCompareResult(this int compareResult)
Parameters
Type Name Description
System.Int32 compareResult

The to convert to the relative CompareResult.

Returns
Type Description
CompareResult

compareResult < 0 => Less
compareResult > 0 => Greater
compareResult is 0 => Equal

| Improve this Doc View Source

ToEnglishWords(Byte)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this byte byte)
Parameters
Type Name Description
System.Byte byte

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(Decimal)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this decimal decimal)
Parameters
Type Name Description
System.Decimal decimal

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(Int16)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this short short)
Parameters
Type Name Description
System.Int16 short

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(Int32)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this int int)
Parameters
Type Name Description
System.Int32 int

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(Int64)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this long long)
Parameters
Type Name Description
System.Int64 long

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(SByte)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this sbyte sbyte)
Parameters
Type Name Description
System.SByte sbyte

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(UInt16)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this ushort ushort)
Parameters
Type Name Description
System.UInt16 ushort

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(UInt32)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this uint uint)
Parameters
Type Name Description
System.UInt32 uint

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToEnglishWords(UInt64)

Converts a to the English words representation.

Declaration
public static string ToEnglishWords(this ulong ulong)
Parameters
Type Name Description
System.UInt64 ulong

The value to convert to English words representation.

Returns
Type Description
System.String

The English words representation of the value.

| Improve this Doc View Source

ToIEnumerable(Range)

Converts a to an .

Declaration
public static System.Collections.Generic.IEnumerable<int> ToIEnumerable(this Range range)
Parameters
Type Name Description
Range range

The to convert int a .

Returns
Type Description
System.Collections.Generic.IEnumerable<System.Int32>

The resulting of the conversion.

| Improve this Doc View Source

ToSpan(Range)

Converts a range to a to an span of values.

Declaration
public static Span<int> ToSpan(this Range range)
Parameters
Type Name Description
Range range
Returns
Type Description
Span<System.Int32>

An span of the values of the range.

| Improve this Doc View Source

ToSpan<T>(Range, Func<Int32, T>)

Converts a range to a to an span of values.

Declaration
public static Span<T> ToSpan<T>(this Range range, Func<int, T> select)
Parameters
Type Name Description
Range range

The range of values to convert into an span.

Func<System.Int32, T> select
Returns
Type Description
Span<T>

An span of the values of the range.

Type Parameters
Name Description
T
| Improve this Doc View Source

ToSpan<T, TSelect>(Range, TSelect)

Converts a range to a to an span of values.

Declaration
public static Span<T> ToSpan<T, TSelect>(this Range range, TSelect select = default(TSelect))
    where TSelect : struct, IFunc<int, T>
Parameters
Type Name Description
Range range

The range of values to convert into an span.

TSelect select

The method for selecting a T based on an .

Returns
Type Description
Span<T>

An span of the values of the range.

Type Parameters
Name Description
T

The resulting element type of the span.

TSelect

The type of method for selecting a T based on an .

| Improve this Doc View Source

ToStepper<T>(System.Collections.Generic.IEnumerable<T>)

Converts an IEnumerable into a stepper delegate./>

Declaration
public static Action<Action<T>> ToStepper<T>(this System.Collections.Generic.IEnumerable<T> iEnumerable)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> iEnumerable

The IEnumerable to convert.

Returns
Type Description
Action<Action<T>>

The stepper delegate comparable to the IEnumerable provided.

Type Parameters
Name Description
T

The generic type being iterated.

| Improve this Doc View Source

ToStepperBreak<T>(System.Collections.Generic.IEnumerable<T>)

Converts an IEnumerable into a stepper delegate./>

Declaration
public static Func<Func<T, StepStatus>, StepStatus> ToStepperBreak<T>(this System.Collections.Generic.IEnumerable<T> iEnumerable)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> iEnumerable

The IEnumerable to convert.

Returns
Type Description
Func<Func<T, StepStatus>, StepStatus>

The stepper delegate comparable to the IEnumerable provided.

Type Parameters
Name Description
T

The generic type being iterated.

| Improve this Doc View Source

TryFirst<T>(System.Collections.Generic.IEnumerable<T>, out T)

Tries to get the first value in an .

Declaration
public static bool TryFirst<T>(this System.Collections.Generic.IEnumerable<T> iEnumerable, out T first)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> iEnumerable

The IEnumerable to try to get the first value of.

T first

The first value of the or default if empty.

Returns
Type Description
System.Boolean

True if the has a first value or false if it is empty.

Type Parameters
Name Description
T

The generic type of .

| Improve this Doc View Source

TryParse<T>(String)

Tries to parse a into a value of the type T.

Declaration
public static (bool Success, T Value) TryParse<T>(string string)
Parameters
Type Name Description
System.String string

The to parse into a value ot type T.

Returns
Type Description
System.ValueTuple<System.Boolean, T>
  • Success: true if the parse was successful or false if not
  • T Value: the value if the parse was successful or default if not
Type Parameters
Name Description
T

The type to parse the into a value of.

| Improve this Doc View Source

TryParseEnglishWordsToByte(ReadOnlySpan<Char>)

Declaration
public static (bool Success, byte Value) TryParseEnglishWordsToByte(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.Byte>
| Improve this Doc View Source

TryParseEnglishWordsToDecimal(ReadOnlySpan<Char>)

Declaration
public static (bool Success, decimal Value) TryParseEnglishWordsToDecimal(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.Decimal>
| Improve this Doc View Source

TryParseEnglishWordsToInt(ReadOnlySpan<Char>)

Declaration
public static (bool Success, int Value) TryParseEnglishWordsToInt(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32>
| Improve this Doc View Source

TryParseEnglishWordsToLong(ReadOnlySpan<Char>)

Declaration
public static (bool Success, long Value) TryParseEnglishWordsToLong(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int64>
| Improve this Doc View Source

TryParseEnglishWordsToSbyte(ReadOnlySpan<Char>)

Declaration
public static (bool Success, sbyte Value) TryParseEnglishWordsToSbyte(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.SByte>
| Improve this Doc View Source

TryParseEnglishWordsToShort(ReadOnlySpan<Char>)

Declaration
public static (bool Success, short Value) TryParseEnglishWordsToShort(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.Int16>
| Improve this Doc View Source

TryParseEnglishWordsToUint(ReadOnlySpan<Char>)

Declaration
public static (bool Success, uint Value) TryParseEnglishWordsToUint(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.UInt32>
| Improve this Doc View Source

TryParseEnglishWordsToUlong(ReadOnlySpan<Char>)

Declaration
public static (bool Success, ulong Value) TryParseEnglishWordsToUlong(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.UInt64>
| Improve this Doc View Source

TryParseEnglishWordsToUshort(ReadOnlySpan<Char>)

Declaration
public static (bool Success, ushort Value) TryParseEnglishWordsToUshort(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span
Returns
Type Description
System.ValueTuple<System.Boolean, System.UInt16>
| Improve this Doc View Source

TryParseRomanNumeral(ReadOnlySpan<Char>)

Attempts to parse a Roman Numeral string into an value.

Declaration
public static (bool Success, int Value) TryParseRomanNumeral(ReadOnlySpan<char> span)
Parameters
Type Name Description
ReadOnlySpan<System.Char> span

The Roman Numeral string to parse into an value.

Returns
Type Description
System.ValueTuple<System.Boolean, System.Int32>
  • Success: true if the parse was successful or false if not
  • Value: the parsed value if the parse was successful or default if not
| Improve this Doc View Source

TryToRomanNumeral(Int32)

Converts an value to a roman numeral ?.

Declaration
public static (bool Success, string? RomanNumeral) TryToRomanNumeral(int value)
Parameters
Type Name Description
System.Int32 value

The value to represent as a roman numeral. [min: 1] [max: 3999]

Returns
Type Description
System.ValueTuple<System.Boolean, System.Nullable<System.String>>
  • Success: true if value was converted to a roman numeral ? or false if not.
  • ? RomanNumeral: the resulting roman numeral ? if successful or null if not.
| Improve this Doc View Source

Variance<T>(Action<Action<T>>)

Computes the variance of a set of numbers.

Declaration
public static T Variance<T>(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper

The set of numbers to compute the variance of.

Returns
Type Description
T

The computed variance of the set of numbers.

Type Parameters
Name Description
T

The numeric type of the computation.

| Improve this Doc View Source

Where<T>(Action<Action<T>>, Func<T, Boolean>)

Filters a stepper using a where predicate.

Declaration
public static Action<Action<T>> Where<T>(this Action<Action<T>> stepper, Func<T, bool> predicate)
Parameters
Type Name Description
Action<Action<T>> stepper

The stepper to filter.

Func<T, System.Boolean> predicate

The predicate of the where filter.

Returns
Type Description
Action<Action<T>>

The filtered stepper.

Type Parameters
Name Description
T

The generic type of the stepper.

| Improve this Doc View Source

XML_FilterOrdered()

Filters a sequence to only values that are in order.

Declaration
public static void XML_FilterOrdered()
| Improve this Doc View Source

XML_FilterOrderedEnumerable()

Filters a sequence to only values that are in order.

Declaration
public static void XML_FilterOrderedEnumerable()
| Improve this Doc View Source

XML_IsInterleaved()

Declaration
public static void XML_IsInterleaved()
Examples
IsInterleaved("abc", "xyz", "axbycz") // True
IsInterleaved("abc", "xyz", "cbazyx") // False (order not preserved)
IsInterleaved("abc", "xyz", "012345") // False
| Improve this Doc View Source

XML_IsInterleavedIterative()

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a interative algorithm.
Runtime: O(Min(a.Length * b.Length))), Ω(1)
Memory: O(a.Length * b.Length)

Declaration
public static void XML_IsInterleavedIterative()
| Improve this Doc View Source

XML_IsInterleavedRecursive()

Determines if c is interleved of a and b, meaning that c it contains all values of a and b while retaining the order of the respective values. Uses a recursive algorithm.
Runtime: O(2^(Min(a.Length + b.Length, c.Length))), Ω(1)
Memory: O(1)

Declaration
public static void XML_IsInterleavedRecursive()
| Improve this Doc View Source

XML_IsOrdered()

Declaration
public static void XML_IsOrdered()
| Improve this Doc View Source

XML_IsPalindrome()

Determines if a sequence is a palindrome.

Declaration
public static void XML_IsPalindrome()
| Improve this Doc View Source

XML_Maximum()

Finds the maximum value in a sequence.

Declaration
public static void XML_Maximum()
| Improve this Doc View Source

XML_MaximumIndex()

Finds the maximum value in a sequence.

Declaration
public static void XML_MaximumIndex()
| Improve this Doc View Source

XML_MaximumValue()

Finds the maximum value in a sequence.

Declaration
public static void XML_MaximumValue()
| Improve this Doc View Source

XML_MaximumValue_Two()

Finds the maximum between two values.

Declaration
public static void XML_MaximumValue_Two()
| Improve this Doc View Source

XML_Minimum()

Finds the minimum value in a sequence.

Declaration
public static void XML_Minimum()
| Improve this Doc View Source

XML_MinimumIndex()

Finds the minimum value in a sequence.

Declaration
public static void XML_MinimumIndex()
| Improve this Doc View Source

XML_MinimumValue()

Finds the minimum value in a sequence.

Declaration
public static void XML_MinimumValue()
| Improve this Doc View Source

XML_MinimumValue_Two()

Finds the minimum between two values.

Declaration
public static void XML_MinimumValue_Two()
| Improve this Doc View Source

XML_Permute()

Declaration
public static void XML_Permute()
| Improve this Doc View Source

XML_PermuteIterative()

Iterates through all the permutations of an indexed collection (using an iterative algorithm).

Declaration
public static void XML_PermuteIterative()
| Improve this Doc View Source

XML_PermuteRecursive()

Iterates through all the permutations of an indexed collection (using a recursive algorithm).

Declaration
public static void XML_PermuteRecursive()
| Improve this Doc View Source

XML_SearchBinary()

Performs a binary search on sorted indexed data.

Declaration
public static void XML_SearchBinary()
| Improve this Doc View Source

XML_SearchGraph()

Declaration
public static void XML_SearchGraph()
| Improve this Doc View Source

XML_SearchGraph_Astar()

Runs the A* search algorithm on a graph.

Declaration
public static void XML_SearchGraph_Astar()
| Improve this Doc View Source

XML_SearchGraph_BreadthFirst()

Runs the Breadth-First-Search search algorithm on a graph.

Declaration
public static void XML_SearchGraph_BreadthFirst()
| Improve this Doc View Source

XML_SearchGraph_Dijkstra()

Runs the Dijkstra search algorithm on a graph.

Declaration
public static void XML_SearchGraph_Dijkstra()
| Improve this Doc View Source

XML_Shuffle()

Sorts values into a randomized order.
Runtime: O(n)
Memory: O(1)

Declaration
public static void XML_Shuffle()
| Improve this Doc View Source

XML_Sort()

Declaration
public static void XML_Sort()
| Improve this Doc View Source

XML_SortBogo()

Sorts values using the bogo sort algorithm.
Runtime: Ω(n), ε(n*n!), O(∞)
Memory: O(1)
Stable: False

Declaration
public static void XML_SortBogo()
| Improve this Doc View Source

XML_SortBubble()

Sorts values using the bubble sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void XML_SortBubble()
| Improve this Doc View Source

XML_SortCocktail()

Sorts values using the cocktail sort algorithm.

Declaration
public static void XML_SortCocktail()
| Improve this Doc View Source

XML_SortComb()

Sorts values using the comb sort algorithm.

Declaration
public static void XML_SortComb()
| Improve this Doc View Source

XML_SortCycle()

Sorts values using the cycle algorithm.

Declaration
public static void XML_SortCycle()
| Improve this Doc View Source

XML_SortGnome()

Sorts values using the gnome sort algorithm.

Declaration
public static void XML_SortGnome()
| Improve this Doc View Source

XML_SortHeap()

Sorts values using the heap sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void XML_SortHeap()
| Improve this Doc View Source

XML_SortInsertion()

Sorts values using the insertion sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void XML_SortInsertion()
| Improve this Doc View Source

XML_SortIntro()

Sorts values using the introspective sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: False

Declaration
public static void XML_SortIntro()
| Improve this Doc View Source

XML_SortMerge()

Sorts values using the merge sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n*ln(n))
Memory: Θ(n)
Stable: True

Declaration
public static void XML_SortMerge()
| Improve this Doc View Source

XML_SortOddEven()

Sorts values using the odd even sort algorithm.
Runtime: Ω(n), ε(n^2), O(n^2)
Memory: O(1)
Stable: True

Declaration
public static void XML_SortOddEven()
| Improve this Doc View Source

XML_SortPancake()

Sorts values using the pancake algorithm.

Declaration
public static void XML_SortPancake()
| Improve this Doc View Source

XML_SortQuick()

Sorts values using the quick sort algorithm.
Runtime: Ω(nln(n)), ε(nln(n)), O(n^2)
Memory: ln(n)
Stable: False

Declaration
public static void XML_SortQuick()
| Improve this Doc View Source

XML_SortSelection()

Sorts values using the selection sort algoritm.
Runtime: Ω(n^2), ε(n^2), O(n^2)
Memory: O(1)
Stable: False

Declaration
public static void XML_SortSelection()
| Improve this Doc View Source

XML_SortShell()

Sorts values using the shell sort algorithm.

Declaration
public static void XML_SortShell()
| Improve this Doc View Source

XML_SortSlow()

Sorts values using the slow sort algorithm.

Declaration
public static void XML_SortSlow()
| Improve this Doc View Source

XML_SortStooge()

Sorts values using the stooge algorithm.

Declaration
public static void XML_SortStooge()
| Improve this Doc View Source

XML_SortTim()

Sorts values using the Tim sort algorithm.
Runtime: Ω(n), ε(nln(n)), O(nln(n))
Memory: O(n)
Stable: True

Declaration
public static void XML_SortTim()
| Improve this Doc View Source

XML_Stepper()

Performs a method on every value in a sequence.

Declaration
public static void XML_Stepper()
| Improve this Doc View Source

XML_StepperBreak()

Performs a method on every value in a sequence.

Declaration
public static void XML_StepperBreak()
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX