TrSort  v0.3.0
A novel sorting algorithm I've invented
Functions
com::saxbophone::tr_sort Namespace Reference

Functions

template<typename T , std::size_t Extent = std::dynamic_extent, typename Real = long double>
void sort (std::span< T, Extent > data)
 Stable sorts the input dating using the Transposition Sort sorting algorithm. More...
 

Detailed Description

This file forms part of tr-sort, a novel sorting algorithm

Copyright Joshua Saxby 2021. All rights reserved.

This is closed-source software and may not be produced in either part or in full, in either source or binary form, without the express written consent of the copyright holder.

Function Documentation

◆ sort()

template<typename T , std::size_t Extent = std::dynamic_extent, typename Real = long double>
void com::saxbophone::tr_sort::sort ( std::span< T, Extent >  data)

Stable sorts the input dating using the Transposition Sort sorting algorithm.

Template Parameters
Tdata typed stored in the iterable to sort
Extentsize of iterable (leave default for dynamic size)
Realdata type used by the algorithm for real numbers
Parameters
[out]dataiterable to sort
Todo:
Add template param or function param for conversion lambda function to be used for casting objects of type T to some other Scalar type. This may or may not need an additional template type param to determine which data type is to be used for the result value of such conversions, when the type T is non-scalar (assuming we don't just default to using Real in that case). Need to check the current implementation of the algorithm to know how to proceed in this regard.