Class VectorHelper
Static class Vector. Defines a set of extension methods
that operates mainly on single-dimensional arrays.
Inheritance
System.Object
VectorHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Numerics
Assembly: Mars.Numerics.dll
Syntax
public static class VectorHelper
Methods
| Improve this Doc View SourceShuffle<T>(T[])
Shuffles an array.
Declaration
public static void Shuffle<T>(this T[] array)
Parameters
Type | Name | Description |
---|---|---|
T[] | array |
Type Parameters
Name | Description |
---|---|
T |
Shuffle<T>(IList<T>)
Shuffles a collection.
Declaration
public static void Shuffle<T>(this IList<T> array)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<T> | array |
Type Parameters
Name | Description |
---|---|
T |
Sort<T>(T[], out Int32[], Boolean, ComparerDirection)
Sorts the elements of an entire one-dimensional array using the given comparison.
Declaration
public static void Sort<T>(this T[] values, out int[] order, bool stable = false, ComparerDirection direction = ComparerDirection.Ascending)
where T : IComparable<T>
Parameters
Type | Name | Description |
---|---|---|
T[] | values | |
System.Int32[] | order | |
System.Boolean | stable | |
ComparerDirection | direction |
Type Parameters
Name | Description |
---|---|
T |