@@ -143,10 +143,7 @@ module stdlib_sorting
143143!!
144144!! The generic subroutine implementing the `ORD_SORT` algorithm to return
145145!! 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:
150147!!
151148!! call ord_sort( array[, work, reverse] )
152149!!
@@ -196,10 +193,7 @@ module stdlib_sorting
196193!!
197194!! The generic subroutine implementing the `SORT` algorithm to return
198195!! 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:
203197!!
204198!! call sort( array[, reverse] )
205199!!
@@ -238,8 +232,6 @@ module stdlib_sorting
238232!! return an index array whose elements would sort the input array in the
239233!! desired direction. It is primarily intended to be used to sort a
240234!! 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- !!
243235!! Its use has the syntax:
244236!!
245237!! call sort_index( array, index[, work, iwork, reverse ] )
@@ -351,7 +343,10 @@ module stdlib_sorting
351343!! `slice.rs`
352344!! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159
353345!! `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
355350!! data, having a performance about 25% slower than `SORT` on such
356351!! data, but has much better performance than `SORT` on partially
357352!! sorted data, having O(N) performance on uniformly non-increasing or
@@ -387,6 +382,7 @@ module stdlib_sorting
387382!!
388383!! The generic subroutine interface implementing the `SORT` algorithm, based
389384!! on the `introsort` of David Musser.
385+ !! ([Specification](../page/specs/stdlib_sorting.html#sort-sorts-an-input-array))
390386
391387#:for k1, t1 in IRS_KINDS_TYPES
392388 pure module subroutine ${k1}$_sort( array, reverse )
@@ -424,7 +420,10 @@ module stdlib_sorting
424420!! based on the `"Rust" sort` algorithm found in `slice.rs`
425421!! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159
426422!! 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
428427!! non-decreasing sort, but if the optional argument `REVERSE` is present
429428!! with a value of `.TRUE.` the indices correspond to a non-increasing sort.
430429
0 commit comments