MCPcopy Create free account
hub / github.com/douchuan/algorithm / do_sort

Function do_sort

src/sort/merge.rs:109–119  ·  view source on GitHub ↗
(a: &mut [T], l: usize, u: usize, ws: &mut [T])

Source from the content-addressed store, hash-verified

107 }
108
109 fn do_sort<T>(a: &mut [T], l: usize, u: usize, ws: &mut [T])
110 where
111 T: Ord + Copy,
112 {
113 if u - l > 1 {
114 let mid = (u + l) / 2;
115 do_sort(a, l, mid, ws);
116 do_sort(a, mid, u, ws);
117 merge(a, l, mid, u, ws);
118 }
119 }
120
121 pub fn sort<T>(a: &mut [T])
122 where

Callers 6

sortMethod · 0.85
do_sortMethod · 0.85
sortMethod · 0.85
do_sortMethod · 0.85
sortFunction · 0.85
wsortFunction · 0.85

Calls 3

wsortFunction · 0.85
wmergeFunction · 0.85
mergeFunction · 0.70

Tested by

no test coverage detected