Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*********************************************************
- *Name: Florian Schönleitner
- *Course: Engineering Info 1
- *Semester: WS14/15
- *Group: 12
- *Project name: search_tic
- *Files: mysort.h, mysort.c, tictactoe.c
- *********************************************************/
- #ifndef MYSORT_H
- #define MYSORT_H
- /**
- * Higher level sorting function that gets an array of objects as input
- * and applies a sorting function on the array using a custom comperator.
- *
- *
- * @param array Pointer to an array of objects.
- * @param objlen Length of one object in bytes.
- * @param arrlen Number of objects in the array.
- * @param threshold Number of max elements for which Bubblesort should
- * be used.
- * @param compfun Callback used to compare two values.
- * @return This function does not return anything.
- */
- void sortArray(void *array , unsigned int objlen , unsigned int arrlen , unsigned int thr$
- // Merge is needed for the MERGESORT in the sortArray function:
- void Merge(void *casted_array, void *left_array, int sL, void *right_array, int sR, unsig$
- // Bubblesort:
- void Bubblesort(void *array, unsigned int objlen, int arrlen, int compfun(void *, void *)$
- #endif /*mysort.h*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement