Skip to content

Quick sort of dynamic arrays of int/float/double #4

@svdhoog

Description

@svdhoog

In the xparser template files all functions related to sorting of dynamic arrays are commented out (see list below). The sort_* functions use bubble sort while quicksort_* use quick sort. It is not so clear to me why this is so? I remember that there was some discussion a few years ago about sorting messages and this has been implemented in Libmboard, but that relates to sorting the message pointers on the MB, using a the sort, key, order XML tags .

Still, it could be useful for FLAME users to be able to sort a dynamic array of doubles or ints, couldn't it?

In header.tmpl: lines 457-458

//void sort_int_array(int_array array);
//int quicksort_int(int array, int elements);
...
//void sort_float_array(float_array array);
//int quicksort_float(float array, int elements);
...
//void sort_double_array(double_array array);
//int quicksort_double(double array, int elements);

In memory.tmpl the function definitions are also commented out:
lines 855-890, 1008-1044, 1163-1199.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions