Vector.Sort Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Sort<T>(Vector<T>) | Sorts a vector in ascending order. |
Sort<T>(Vector<T>, SortOrder) | Sorts a vector in the specified order. |
Sort<T>(Vector<T>, SortOrder, Permutation) | Sorts a vector in the specified order and also returns the sorting permutation. |
Sort<T>(Vector<T>)
Sorts a vector in ascending order.
public static Vector<T> Sort<T>(
this Vector<T> vector
)
Parameters
- vector Vector<T>
Type Parameters
- T
Return Value
Vector<T>Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Sort<T>(Vector<T>, SortOrder)
Sorts a vector in the specified order.
public static Vector<T> Sort<T>(
this Vector<T> vector,
SortOrder sortOrder
)
Parameters
- vector Vector<T>
- The vector to sort.
- sortOrder SortOrder
- A SortOrder value that specifies whether the elements should be sorted in ascending or descending order.
Type Parameters
- T
Return Value
Vector<T>Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Sort<T>(Vector<T>, SortOrder, Permutation)
Sorts a vector in the specified order and also returns the sorting permutation.
public static Vector<T> Sort<T>(
this Vector<T> vector,
SortOrder sortOrder,
out Permutation permutation
)
Parameters
- vector Vector<T>
- The vector to sort.
- sortOrder SortOrder
- A SortOrder value that specifies whether the elements should be sorted in ascending or descending order.
- permutation Permutation
- On return, the Permutation that transforms vector into the sorted result.
Type Parameters
- T