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 | #define extractnz_boundaries_type_matrix(t) \ |
---|
14 | void short_name(t,extractnz_boundaries_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t * nclnz, int32_t * nchnz); |
---|
15 | |
---|
16 | extractnz_boundaries_type_matrix(int8_t); |
---|
17 | extractnz_boundaries_type_matrix(uint8_t); |
---|
18 | extractnz_boundaries_type_matrix(int16_t); |
---|
19 | extractnz_boundaries_type_matrix(uint16_t); |
---|
20 | extractnz_boundaries_type_matrix(int32_t); |
---|
21 | extractnz_boundaries_type_matrix(uint32_t); |
---|
22 | extractnz_boundaries_type_matrix(int64_t); |
---|
23 | extractnz_boundaries_type_matrix(uint64_t); |
---|
24 | extractnz_boundaries_type_matrix(float); |
---|
25 | extractnz_boundaries_type_matrix(double); |
---|
26 | |
---|
27 | |
---|
28 | void sort_si32matrix_selection2(int32_t ** m, int32_t nl, int32_t nh); |
---|
29 | void sort_f64matrix_selection(double * m, int32_t nl, int32_t nh); |
---|
30 | void sort_si32matrix_selection(int32_t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t nrow); |
---|
31 | void sort_si32matrix_leftpart_selection2(int32_t ** m, int32_t nl, int32_t nh, int32_t len); |
---|
32 | |
---|
33 | /* |
---|
34 | * Sort the first len item of a 2-row matrix |
---|
35 | */ |
---|
36 | |
---|
37 | void sort_index_si32matrix_selection_kmin(int32_t ** key, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t ** index, int32_t k); |
---|
38 | void sort_index_si32matrix_selection_kmax(int32_t ** key, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t ** index, int32_t k); |
---|
39 | |
---|
40 | /* |
---|
41 | * appel de "sort_index_ivector_selection_k" pour chaque ligne |
---|
42 | * ATTENTION L'initialisation du tableau index est fait ici |
---|
43 | */ |
---|
44 | |
---|
45 | void sortv_si32matrix_selection_min(int32_t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t nc); |
---|
46 | void sortv_si32matrix_selection_max(int32_t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t nc); |
---|
47 | void sortv_si32matrix_selection_kmin(int32_t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t nc, int32_t k); |
---|
48 | void sortv_si32matrix_selection_kmax(int32_t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t nc, int32_t k); |
---|
49 | |
---|
50 | /* |
---|
51 | * tri vertical, de toutes les lignes |
---|
52 | * tri vertical, d'une partie des lignes |
---|
53 | */ |
---|
54 | |
---|
55 | void sortv_index_imatrix_selection_max(int ** key, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t * index, int32_t nc); |
---|
56 | void sortv_index_imatrix_selection_min(int32_t ** key, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t * index, int32_t nc); |
---|
57 | |
---|
58 | /* |
---|
59 | * trie de la colonne nc de la matrice key, nc[ncl..nch] |
---|
60 | * la matrice reste inchangee, seule l'index est modifie |
---|
61 | */ |
---|
62 | |
---|
63 | #endif /* _NRSORT2_H_ */ |
---|
64 | |
---|
65 | // Local Variables: |
---|
66 | // tab-width: 4 |
---|
67 | // c-basic-offset: 4 |
---|
68 | // c-file-offsets:((innamespace . 0)(inline-open . 0)) |
---|
69 | // indent-tabs-mode: nil |
---|
70 | // End: |
---|
71 | |
---|
72 | // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
73 | |
---|