Sort
- class corsort.Sort(compute_history=False)[source]
Abstract class for sorting algorithms.
- Parameters:
compute_history (
bool
) – If True, then compute the history of the distance to the sorted array.
- history_comparisons_
History of the pairwise comparisons. Tuple (i, j) means that items of indices i and j were compared, and that perm[i] < perm[j].
- distance_to_sorted_array()[source]
Distance to sorted array.
- Returns:
Distance between the current estimation and the sorted array.
- Return type:
- property history_comparisons_values_
History of the pairwise comparisons, in terms of compared values. Tuple (x, y) means that items of values x and y were compared, and that x < y.