-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsorts.h
32 lines (25 loc) · 857 Bytes
/
sorts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef SORTS_H_INCLUDED
#define SORTS_H_INCLUDED
#include <stdbool.h>
struct ResultSort {
char name_sort[32];
int cnt_num;
int max_num;
double sec_sort;
bool can_neg;
bool res_sort;
};
extern "C" {
typedef void (*sort_cb_t)(int *,int);
extern bool check_sort(int *arr, int n);
extern double mesure_time();
extern void fill_random(int *arr, int n, int max_num, bool can_neg, int offset);
extern void testing_sort(int *arr, int n, int max_num, bool can_neg,
sort_cb_t callback, char const * name_sort, char const * fname);
extern void choicemethodsort(int *arr, int n);
extern void insertsort(int *arr, int n);
extern void quicksort(int *arr, int n);
extern void mergesort(int *arr, int n);
extern void heapsort(int *arr, int n);
}
#endif // SORTS_H_INCLUDED