1 | /* ----------------- */ |
---|
2 | /* --- nrsort2.h --- */ |
---|
3 | /* ----------------- */ |
---|
4 | |
---|
5 | /* |
---|
6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
7 | * Univ Paris Sud XI, CNRS |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _NRSORT2_H_ |
---|
11 | #define _NRSORT2_H_ |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | #ifdef PRAGMA_VERBOSE |
---|
15 | #pragma message ("C++") |
---|
16 | #endif |
---|
17 | extern "C" { |
---|
18 | #endif |
---|
19 | |
---|
20 | #ifdef PRAGMA_VERBOSE |
---|
21 | //#pragma message("- include nrsort2.h") |
---|
22 | #endif |
---|
23 | |
---|
24 | IMAGE_EXPORT(void) sort_dmatrix_selection (double *m, long nl, long nh); |
---|
25 | |
---|
26 | IMAGE_EXPORT(void) sort_imatrix_selection2(int **m, long nl, long nh); |
---|
27 | IMAGE_EXPORT(void) sort_imatrix_selection (int **m, long nrl, long nrh, long ncl, long nch, long nrow); |
---|
28 | |
---|
29 | IMAGE_EXPORT(void) sort_imatrix_leftpart_selection2(int **m, long nl, long nh, long len); |
---|
30 | /* |
---|
31 | * Sort the first len item of a 2-row matrix |
---|
32 | */ |
---|
33 | |
---|
34 | IMAGE_EXPORT(void) sort_index_imatrix_selection_kmin(int **key, long nrl,long nrh,long ncl, long nch, int **index, int k); |
---|
35 | IMAGE_EXPORT(void) sort_index_imatrix_selection_kmax(int **key, long nrl,long nrh,long ncl, long nch, int **index, int k); |
---|
36 | /* |
---|
37 | * appel de "sort_index_ivector_selection_k" pour chaque ligne |
---|
38 | * ATTENTION L'initialisation du tableau index est fait ici |
---|
39 | */ |
---|
40 | |
---|
41 | IMAGE_EXPORT(void) sortv_imatrix_selection_min(int **m, long nrl,long nrh,long ncl, long nch, long nc); |
---|
42 | IMAGE_EXPORT(void) sortv_imatrix_selection_max(int **m, long nrl,long nrh,long ncl, long nch, long nc); |
---|
43 | |
---|
44 | IMAGE_EXPORT(void) sortv_imatrix_selection_kmin(int **m, long nrl,long nrh,long ncl, long nch, long nc, int k); |
---|
45 | IMAGE_EXPORT(void) sortv_imatrix_selection_kmax(int **m, long nrl,long nrh,long ncl, long nch, long nc, int k); |
---|
46 | |
---|
47 | /* |
---|
48 | * tri vertical, de toutes les lignes |
---|
49 | * tri vertical, d'une partie des lignes |
---|
50 | */ |
---|
51 | IMAGE_EXPORT(void) sortv_index_imatrix_selection_max(int **key, long nrl,long nrh,long ncl, long nch, int *index, int nc); |
---|
52 | IMAGE_EXPORT(void) sortv_index_imatrix_selection_min(int **key, long nrl,long nrh,long ncl, long nch, int *index, int nc); |
---|
53 | /* |
---|
54 | * trie de la colonne nc de la matrice key, nc[ncl..nch] |
---|
55 | * la matrice reste inchangee, seule l'index est modifie |
---|
56 | */ |
---|
57 | |
---|
58 | #ifdef __cplusplus |
---|
59 | } |
---|
60 | #endif |
---|
61 | |
---|
62 | #endif /* _NRSORT2_H_ */ |
---|