Advertisement
Guest User

Untitled

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