4
/*============================================================================
5
* Functions related to in-place sorting of arrays.
6
*===========================================================================*/
9
This file is part of Code_Saturne, a general-purpose CFD tool.
11
Copyright (C) 1998-2011 EDF S.A.
13
This program is free software; you can redistribute it and/or modify it under
14
the terms of the GNU General Public License as published by the Free Software
15
Foundation; either version 2 of the License, or (at your option) any later
18
This program is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23
You should have received a copy of the GNU General Public License along with
24
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25
Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
/*----------------------------------------------------------------------------*/
30
/*----------------------------------------------------------------------------
32
*---------------------------------------------------------------------------*/
36
/*----------------------------------------------------------------------------
38
*---------------------------------------------------------------------------*/
42
/*---------------------------------------------------------------------------*/
46
/*=============================================================================
48
*===========================================================================*/
50
/*============================================================================
52
*===========================================================================*/
54
/*=============================================================================
55
* Static global variables
56
*===========================================================================*/
58
/*=============================================================================
59
* Public function prototypes
60
*===========================================================================*/
62
/*----------------------------------------------------------------------------
63
* Sort an array "a" between its left bound "l" and its right bound "r"
64
* thanks to a shell sort (Knuth algorithm).
70
*---------------------------------------------------------------------------*/
73
cs_sort_shell(cs_int_t l,
77
/*----------------------------------------------------------------------------
78
* Sort a global array "a" between its left bound "l" and its right bound "r"
79
* thanks to a shell sort (Knuth algorithm).
85
*---------------------------------------------------------------------------*/
88
cs_sort_gnum_shell(cs_int_t l,
92
/*----------------------------------------------------------------------------
93
* Sort an array "a" and apply the sort to its associated array "b" (local
95
* Sort is realized thanks to a shell sort (Knuth algorithm).
100
* a <-> array to sort
101
* b <-> associated array
102
*---------------------------------------------------------------------------*/
105
cs_sort_coupled_shell(cs_int_t l,
110
/*----------------------------------------------------------------------------
111
* Sort an array "a" and apply the sort to its associated array "b" (local
113
* Sort is realized thanks to a shell sort (Knuth algorithm).
118
* a <-> array to sort
119
* b <-> associated array
120
*---------------------------------------------------------------------------*/
123
cs_sort_coupled_gnum_shell(cs_int_t l,
128
/*---------------------------------------------------------------------------*/
132
#endif /* __CS_SORT_H__ */