Private implementation details.
Private implementation details.
(counting-merge-sort keyfn xs)
(counting-merge-sort keyfn n-swaps_ v)
Modified merge sort implementation that tracks number of values that needed to be swapped, and returns [<n-swaps> <sorted-xs>] in O(n.log_n).
Modified merge sort implementation that tracks number of values that needed to be swapped, and returns [<n-swaps> <sorted-xs>] in O(n.log_n).
(doubles? x)
(indexed xs)
[:a :b :c ...] -> {0 :a, 1 :b, 2 :c ...},
useful for distinguishing between duplicate elements in xs
.
[:a :b :c ...] -> {0 :a, 1 :b, 2 :c ...}, useful for distinguishing between duplicate elements in `xs`.
(is-not-zero ex-msg ex-map x)
(is-p x)
(is-same-count context xs ys)
(is-sorted x)
(kendall-correlation-impl-knight xys)
Returns {:keys [n_c-n_d n_xy n_yt n_xyt n_p} in O(n.log_n) using Knight's Tau method [R1], [R2].
Returns {:keys [n_c-n_d n_xy n_yt n_xyt n_p} in O(n.log_n) using Knight's Tau method [R1], [R2].
(kendall-correlation-impl-naive reduce-combinations xys)
Returns {:keys [n_c-n_d n_xy n_yt n_xyt n_p} in O(n²)
using reduce-combinations
.
Returns {:keys [n_c-n_d n_xy n_yt n_xyt n_p} in O(n²) using `reduce-combinations`.
(kendall-knight-tied-pair-count keyfn sorted-xs)
Given sorted xs
, returns the total number of rank ties in all possible
[xi xj] combinations, as per Knight's Tau method [R1], [R2].
Given sorted `xs`, returns the total number of rank ties in all possible [xi xj] combinations, as per Knight's Tau method [R1], [R2].
(longs? x)
(sorted-doubles x)
Advanced: returns a SortedDoubles instance for given numerical values, backed by a double array. May be provided to certain utils as a performance optimisation.
Advanced: returns a SortedDoubles instance for given numerical values, backed by a double array. May be provided to certain utils as a performance optimisation.
(sorted-doubles? x)
(sorted-fixnums? x)
(sorted-longs x)
Advanced: returns a SortedLongs instance for given numerical values, backed by a long array. May be provided to certain utils as a performance optimisation.
Advanced: returns a SortedLongs instance for given numerical values, backed by a long array. May be provided to certain utils as a performance optimisation.
(sorted-longs? x)
(sorted-max x)
(sorted-median x)
(sorted-min x)
(sorted-percentile p x)
(vsplit v)
Splits vector ~evenly into [<left> <right>] sub-vectors in O(1).
Splits vector ~evenly into [<left> <right>] sub-vectors in O(1).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close