Commit graph

88 commits

Author SHA1 Message Date
Jack Stouffer
e21f2729ba [Issue 16170] Seperate std.algorithm.sorting.partition into various overloads in order to facilitate further improvements 2016-09-30 15:16:36 +01:00
Andrei Alexandrescu
66ba7b87f0 This is 3% faster because of better use of speculative hardware 2016-08-12 17:09:47 -04:00
Andrei Alexandrescu
30cb5191b0 Simplify, eliminate redundant work in sort 2016-08-12 15:55:45 -04:00
Walter Bright
ec8534d58b sorting.d: add overflow checks 2016-08-05 00:44:20 -07:00
Walter Bright
03a5eae0f4 fix .ptr safety problem in schwartzSort() 2016-08-03 00:03:21 -07:00
Jack Stouffer
f30c6a106c Enable always true assert checks in Travis 2016-07-31 10:47:26 -04:00
Walter Bright
c6aa7e19d5 Merge pull request #4685 from wilzbach/std_algorithm_sorting
add unittest attributes to std.algorithm.sorting
2016-07-29 15:09:35 -07:00
Sebastian Wilzbach
790aada728 replace functions with lambda aliases 2016-07-29 18:16:34 +02:00
Sebastian Wilzbach
fde82ff034 std.algorithm.sorting: enable CTFE test for Timsort 2016-07-29 17:31:20 +02:00
Sebastian Wilzbach
016d5145b2 make std.algorithm.sorting @safe-er 2016-07-29 17:14:20 +02:00
Nick Treleaven
46a08e86d7 [trivial] Tweak docs for std.algorithm.sort 2016-07-18 12:03:37 +01:00
Jack Stouffer
b24000513d Removed unused variables from std.algorithm.sorting 2016-07-08 11:34:48 -04:00
Andrei Alexandrescu
e59c06b410 Merge pull request #4431 from wilzbach/document_std_algorithm_test
add external imports to documented unittests in std.algorithm
2016-06-18 06:38:44 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
8b60ec24b0 add external imports to documented unittests in std.algorithm 2016-06-15 03:42:28 +02:00
Steven Schveighoffer
c5bb43ce54 Merge pull request #4425 from JackStouffer/issue16073
Partial Fix for Issue 16073 (part 2)
2016-06-14 11:01:59 -04:00
Jack Stouffer
94d74ac8f5 [Issue 16073] Fix incorrect uses of random access range primitives in std.algorithm.sorting 2016-06-14 10:04:01 -04:00
Dmitry Olshansky
6dc8e467b0 Merge pull request #4415 from WalterBright/safeSchwartz
make the Schwartz @safe
2016-06-10 21:10:00 +04:00
Walter Bright
23613c2189 make the Schwartz @safe 2016-06-07 04:19:06 -07:00
Sebastian Wilzbach
1d34a121e9 apply all-man braces in Phobos
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
anonymous
ef9722928c XREF_PACK_NAMED -> REF_ALTTEXT (sed)
Done by:

arg='\s*([^(),]*)'
from='\$\(XREF_PACK_NAMED\s'$arg','$arg','$arg','$arg'\)'
to='$(REF_ALTTEXT \4, \3, std,\1,\2)'
(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r "s/$from/$to/g"
2016-05-27 21:32:46 +02:00
anonymous
d648f9320e XREF_PACK -> REF (sed)
Done by:

from='\$\(XREF_PACK\s+([^(),]*),\s*([^(),]*),\s*([^(),]*)\)'
to='$(REF \3, std,\1,\2)'
(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r "s/$from/$to/g"
2016-05-27 21:32:46 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
614294cd70 remove whitespace in ddoc output of std/algorithm 2016-05-25 03:57:01 +02:00
Sebastian Wilzbach
89a2dd5f11 use mref macro instead of link2 2016-05-16 03:30:08 +03:00
Sebastian Wilzbach
6b165d4deb Fix issue 10777 - multiSort should return a SortedRange 2016-04-30 12:38:27 +03:00
Dmitry Olshansky
c1027f1970 Merge pull request #4246 from wilzbach/sed_spaces_part_2
style fix: add space after 'for' operator
2016-04-27 16:17:18 +04:00
Brian Schott
6a349b32ca Merge pull request #4238 from 9il/swap
Trivial. clean imports in sorting
2016-04-26 17:11:52 -07:00
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Ilya Yaroshenko
f5f0fa5cd6 clean imports in sorting 2016-04-26 17:07:30 +02:00
Dmitry Olshansky
4b44f19180 Merge pull request #4214 from wilzbach/sort_use_release
std.algorithm.sort docu: use release to get the source back
2016-04-22 18:40:52 +04:00
Sebastian Wilzbach
95cb575338 add isStrictlyMonotonic for ranges 2016-04-20 22:57:44 +03:00
Sebastian Wilzbach
120b7a4a56 std.algorithm.sort docu: use release to get the source back 2016-04-20 17:44:18 +03:00
Ilya Yaroshenko
ddf8268d42 UFCS for moveAt, moveFront, moveBack 2016-04-09 09:28:14 +02:00
Sebastian Wilzbach
b05f4afe1c change usage of swapAt to UFCS 2016-04-08 01:18:45 +03:00
Sebastian Wilzbach
540ff4576f std.algorithm.sorting: fix - save reference in isSorted 2016-03-23 16:01:51 +02:00
Dmitry Olshansky
1b4100d63f Revert "Merge pull request #4025 from greenify/is_strictly_sorted"
This reverts commit 1f00853513, reversing
changes made to 580d72f3b3.
2016-03-21 21:10:38 +03:00
Sebastian Wilzbach
3209fe0bfb add isStrictlySorted for ranges 2016-03-14 20:34:33 +02:00
H. S. Teoh
ba10d5c3a0 Improve schwartzSort documentation. 2016-02-11 14:00:27 -08:00
Martin Nowak
10d1dc4a5b Merge remote-tracking branch 'upstream/stable' into merge_stable 2016-01-17 20:36:06 +01:00
Andrei Alexandrescu
01bdccf310 Improved siftDown and percolate, also documented both 2016-01-15 17:24:49 -05:00
Andrei Alexandrescu
96ece512a2 Use member syntax for swapAt to give the range a chance to intercept it 2016-01-15 12:26:05 -05:00
Andrei Alexandrescu
c12573a337 Faster heap operations 2016-01-15 11:25:28 -05:00
Andrei Alexandrescu
f259c22987 topN: define behavior for nth >= r.length, improve speed 2016-01-14 23:58:51 -05:00
Andrei Alexandrescu
19288618af Bug fix: swap must happen 2016-01-11 13:03:10 -05:00
Andrei Alexandrescu
06cb165a47 Improve performance of partition 2016-01-11 12:25:29 -05:00
Andrei Alexandrescu
9c7f0dabc3 Actually the pivot must be swapped back, but only upon success 2016-01-11 12:03:40 -05:00
Andrei Alexandrescu
721fcb40ed Fix https://issues.dlang.org/show_bug.cgi?id=15553 2016-01-11 11:32:14 -05:00