@@ -143,10 +143,7 @@ module stdlib_sorting
143
143
!!
144
144
!! The generic subroutine implementing the `ORD_SORT` algorithm to return
145
145
!! an input array with its elements sorted in order of (non-)decreasing
146
- !! value.
147
- !! ([Specification](../page/specs/stdlib_sorting.html#ord_sort-sorts-an-input-array))
148
- !!
149
- !! Its use has the syntax:
146
+ !! value. Its use has the syntax:
150
147
!!
151
148
!! call ord_sort( array[, work, reverse] )
152
149
!!
@@ -196,10 +193,7 @@ module stdlib_sorting
196
193
!!
197
194
!! The generic subroutine implementing the `SORT` algorithm to return
198
195
!! an input array with its elements sorted in order of (non-)decreasing
199
- !! value.
200
- !! ([Specification](../page/specs/stdlib_sorting.html#sort-sorts-an-input-array))
201
- !!
202
- !!Its use has the syntax:
196
+ !! value. Its use has the syntax:
203
197
!!
204
198
!! call sort( array[, reverse] )
205
199
!!
@@ -238,8 +232,6 @@ module stdlib_sorting
238
232
!! return an index array whose elements would sort the input array in the
239
233
!! desired direction. It is primarily intended to be used to sort a
240
234
!! derived type array based on the values of a component of the array.
241
- !! ([Specification](../page/specs/stdlib_sorting.html#sort_index-creates-an-array-of-sorting-indices-for-an-input-array-while-also-sorting-the-array)
242
- !!
243
235
!! Its use has the syntax:
244
236
!!
245
237
!! call sort_index( array, index[, work, iwork, reverse ] )
@@ -351,7 +343,10 @@ module stdlib_sorting
351
343
!! `slice.rs`
352
344
!! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159
353
345
!! `ORD_SORT` is a hybrid stable comparison algorithm combining `merge sort`,
354
- !! and `insertion sort`. It is always at worst O(N Ln(N)) in sorting random
346
+ !! and `insertion sort`.
347
+ !! ([Specification](../page/specs/stdlib_sorting.html#ord_sort-sorts-an-input-array))
348
+ !!
349
+ !! It is always at worst O(N Ln(N)) in sorting random
355
350
!! data, having a performance about 25% slower than `SORT` on such
356
351
!! data, but has much better performance than `SORT` on partially
357
352
!! sorted data, having O(N) performance on uniformly non-increasing or
@@ -387,6 +382,7 @@ module stdlib_sorting
387
382
!!
388
383
!! The generic subroutine interface implementing the `SORT` algorithm, based
389
384
!! on the `introsort` of David Musser.
385
+ !! ([Specification](../page/specs/stdlib_sorting.html#sort-sorts-an-input-array))
390
386
391
387
#:for k1, t1 in IRS_KINDS_TYPES
392
388
pure module subroutine ${k1}$_sort( array, reverse )
@@ -424,7 +420,10 @@ module stdlib_sorting
424
420
!! based on the `"Rust" sort` algorithm found in `slice.rs`
425
421
!! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159
426
422
!! but modified to return an array of indices that would provide a stable
427
- !! sort of the rank one `ARRAY` input. The indices by default correspond to a
423
+ !! sort of the rank one `ARRAY` input.
424
+ !! ([Specification](../page/specs/stdlib_sorting.html#sort_index-creates-an-array-of-sorting-indices-for-an-input-array-while-also-sorting-the-array)
425
+ !!
426
+ !! The indices by default correspond to a
428
427
!! non-decreasing sort, but if the optional argument `REVERSE` is present
429
428
!! with a value of `.TRUE.` the indices correspond to a non-increasing sort.
430
429
0 commit comments