Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.20 KB | None | 0 0
  1.  
  2. /*********************************************************
  3.  *Name: Florian Schönleitner
  4.  *Course: Engineering Info 1
  5.  *Semester: WS14/15
  6.  *Group: 12
  7.  *Project name: search_tic
  8.  *Files: mysort.h, mysort.c, tictactoe.c
  9. *********************************************************/
  10.  
  11. #ifndef MYSORT_H
  12. #define MYSORT_H
  13.  
  14.  
  15.  /**
  16.  * Higher level sorting function that gets an array of objects as input
  17.  * and applies a sorting function on the array using a custom comperator.
  18.  *
  19.  *
  20.  * @param array Pointer to an array of objects.
  21.  * @param objlen Length of one object in bytes.
  22.  * @param arrlen Number of objects in the array.
  23.  * @param threshold Number of max elements for which Bubblesort should
  24.  * be used.
  25.  * @param compfun Callback used to compare two values.
  26.  * @return This function does not return anything.
  27.  */
  28.  
  29. void sortArray(void *array , unsigned int objlen , unsigned int arrlen , unsigned int thr$
  30.  
  31.  
  32. // Merge is needed for the MERGESORT in the sortArray function:
  33. void Merge(void *casted_array, void *left_array, int sL, void *right_array, int sR, unsig$
  34.  
  35.  
  36. // Bubblesort:
  37. void Bubblesort(void *array, unsigned int objlen, int arrlen, int compfun(void *, void *)$
  38. #endif /*mysort.h*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement