Package: corsort
CorsortComparison-Oriented Sort.Free software: GNU General Public License v3Documentation:https://emczg.github.io/corsort/.FeaturesImplement Corsort and Multizip sort, some efficient anytime sorting algorithms.Compare them with classical algorithms through Monte-Carlo simulations.CreditsThis package was created withCookiecutterand thefrancois-durand/package_helper_2project template.History0.1.2 (2023-06-05): Binary Insertion Sort, Multizip Sort, ShellsortCorsortand subclasses (i.e. non-jit Corsort algorithms):Add parameterrecord_leq. If True, then record all the states of theleq_matrix.Add parameterfinal_score. Scorer used to compute the tentative estimate of the sorted list.AddCorsortChainDecompositionMergeV: Corsort based on chain decomposition, with “V-shape” merging.AddCorsortChainDecompositionMergeX: Corsort based on chain decomposition, with “X-shape” merging.Addgreedy_chain_decomposition: greedy chain decomposition.Addlongest_chain: longest chain.Addlongest_chain_starting_at: longest chain starting at a given item.Addmulti_merge: merge consecutive sorted portions of a list, two by two, in alternance. Used for multizip sort.Addscorer_deltaandscorer_rho: scorer delta or rho. Mostly used for thefinal_scoreparameter ofCorsort.AddSortBinaryInsertion: binary insertion sort.AddSortMultizip: multizip sort.AddSortShell: Shellsort.Addsplit_pointer_lists: compute the indices of the boundaries for all the steps of bottom-up (BFS) merge sort.Addtransitive_reduction: transitive reduction of aleqmatrix.WrapFullJit: add parameterrecord_states. If True, then record the states of the algorithm.Add predefined wrappers usingWrapFullJit:JitCorsortBorda,JitHeapsort,JitCorsortDeltaMaxRho,JitCorsortDeltaSumRho, etc.RenameCorSorttoCorsort, and similarly for subclasses.Renameprint_ordertoprint_order_as_letters.Renamedrifttodeltaandspacedtorhoin all function names in order to match the notations of our papers.Renamescorer_drifttojit_scorer_deltaandscorer_spacedtojit_scorer_rho.Renameplustosumin jit corsort functions. For example, renamejit_corsort_drift_plus_spacedtojit_corsort_delta_sum_rho.RenameSortMergeBfstoSortMergeBottomUp.RenameSortMergeDfstoSortMergeTopDown.0.1.1 (2023-04-7): More history, ChainAndYAddSort.history_comparisons_values_: history of the pairwise comparisons, in terms of compared values
(whereashistory_comparisons_gives the original indices). Similarly, addWrapSortScorer.history_comparisons_values_andWrapFullJit.history_comparisons_values_.AddCorSort.history_leq_: history of the matrixleq_representing the current poset. This is recorded
if the newly added parameterrecord_leqis True.AddWrapFullJit.history_states_: history of the state of the list.AddChainAndY: poset consisting of a chain and a Y-shape.Addprint_corsort_execution: generate LaTeX code for a CorSort execution.partitionis now stable (in the sense of “stable” sorting), hence alsoSortQuick,SortAsortQuickselect,
andSortLargestInterval.0.1.0 (2023-02-16): First releaseCorsort (regular Python or with numba acceleration).Classical sorting algorithms: Asort (with quickselect for median selection), Ford-Johnson, quicksort, quicksort with
priority on the largest interval, merge sort (DFS or BFS).Entropy bound.Monte-Carlo simulations.