Skip to content

Instantly share code, notes, and snippets.

@tonigi
tonigi / isort.h
Created June 30, 2014 08:04
Indices after sorting in C
/* Index sort. A sort function which returns indices as well as the
* sorted values. Tested with gcc only. T. Giorgino 2014
*/
#include <stdlib.h>
#ifndef _ISORT
#define _ISORT
const int descend = 1;