/// <summary>
/// Sorts the given Matrix by the specified row or column index and returns the new Matrix
/// along with the original indices.
/// </summary>
/// <param name="m">The Matrix</param>
/// <param name="keySelector">Property selector to sort by.</param>
/// <param name="t">
/// Specifies whether to sort horizontally (<see cref="VectorType.Col" />) or vertically (
/// <see cref="VectorType.Row" />).
/// </param>
/// <param name="isAscending">Determines whether to sort ascending or descending (Default: True)</param>
/// <param name="indices">Vector of the original (<paramref name="t" />) indices before the sort operation.</param>
/// <returns>New Matrix and Vector of original indices.</returns>
public static Matrix Sort(
this Matrix m,
Func <Vector, double> keySelector,
VectorType t,
bool isAscending,
out Vector indices)
{
return(Matrix.Sort(m, keySelector, t, isAscending, out indices));
}