Commit graph

73 commits

Author SHA1 Message Date
David Simcha
5b123f9d18 64-bit fixes for Phobos2. All of std now passes semantic analysis on Linux with -m64. 2010-11-10 00:02:03 +00:00
Shin Fujishiro
258e0b6f1c Fixed bug 5049: bringToFront() returns wrong value.
- Fixed the return value.
- Made bringToFront() handle stepping-over conditions correctly.
- Added undocumented SList.Range.sameHead for making the example code work.
2010-10-15 17:52:43 +00:00
Shin Fujishiro
3ec3fee75a Ddoc: Fixed bug 4634 and some trivial doc isues in std.algorithm & range.
- Bug 4634: typo in levenshteinDistanceAndPath documentation
- Got rid of mentions of iterator-age begin(r)
- equal() not equals()
2010-10-13 05:40:03 +00:00
Shin Fujishiro
3c048ac456 Migration of tup.field[k] to tup[k].
Replaced ad-hoc 'is tuple?' checks with isTuple template.

The "this._cache" change in std.range is just a workaround for bug 5046.
2010-10-13 05:39:53 +00:00
Andrei Alexandrescu
61cc023db7 Removed slack filter() code; changed filter such that filter is curryable 2010-10-03 18:39:33 +00:00
Andrei Alexandrescu
6dded8e278 Added function balancedParens 2010-09-26 19:54:34 +00:00
Andrei Alexandrescu
f0b2af7f07 Added function balancedParens 2010-09-26 19:52:44 +00:00
David Simcha
b597d23f83 Bug 4888: Heavy reliance on Bug 3534 in Phobos range usage. I used a different approach here than the first one I tried. I only did what was necessary to make Phobos work instead of trying to fix the deeper issue of making std.algorithm to work w/ const/immutable arrays. 2010-09-18 21:00:52 +00:00
David Simcha
72d6bf1217 Add back lowerBound, upperBound, canFindSorted, equalRange to std.algorithm, but with "scheduled for deprecaton" pragmas on instantiation. 2010-09-15 23:02:23 +00:00
David Simcha
b1bb7afb36 Make sort work on sealed ranges that don't explicitly define moveFront() and friends as long as these are implicitly defined. 2010-09-13 22:57:12 +00:00
Shin Fujishiro
ac2b71d2e1 Fixed: std.algorithm.findAdjacent() returns non-empty range if no matching pair is found. 2010-09-08 21:48:06 +00:00
Andrei Alexandrescu
fcfb07ff9b Improvements to find() and startsWith(), removed crap, added SortedRange, added debug=std_algorithm 2010-09-08 13:03:47 +00:00
David Simcha
76e5bfa517 Bug 4789: std.algorithm.sort bug 2010-09-03 03:51:54 +00:00
David Simcha
1725ddc8ed std.algorithm.reduce() should throw on empty ranges and no explicit seed instead of silently returning bogus results. 2010-08-30 23:09:39 +00:00
David Simcha
f9e540579b Make std.algorithm.reduce() work with opApply iteration. 2010-08-30 04:06:23 +00:00
Walter Bright
b8ce58ccd1 detab sources 2010-08-23 02:14:45 +00:00
Andrei Alexandrescu
3f2b8c12ea 64-bit compatibility work 2010-08-22 20:55:22 +00:00
David Simcha
d316980220 Bug 2903: Splitter should be bi-dir if the input range is bi-dir (Single-character separator version, since range separator version was fixed a long time ago. Excluded terminator version b/c it's not documented/officially part of Phobos yet and there are issues w/ including an empty range if the last character is the terminator that need to be resolved first.) 2010-08-18 04:06:26 +00:00
David Simcha
95122e68ab Bug 4408: Ambiguity when using std.algorithm.splitter with generic ranges 2010-08-17 02:56:56 +00:00
David Simcha
49852ac686 save() for std.algorithm. 2010-08-15 03:50:54 +00:00
Lars T. Kyllingstad
4b90954691 Bug 3946: schwartzSort - SwapStrategy always unstable 2010-08-13 10:55:11 +00:00
David Simcha
98c0badf4a Add unittests. 2010-08-11 22:23:46 +00:00
David Simcha
7ca87c26ac Quick updates to std.algorithm: Unquals in a few places to work w/ const ranges, re-add save() to Filter. 2010-08-11 20:24:17 +00:00
Walter Bright
413c75336f revert filter to old version 2010-08-11 02:48:23 +00:00
Walter Bright
d98807e043 add unittest for case that used to fail 2010-08-10 23:10:03 +00:00
Andrei Alexandrescu
86108199d6 Reformatted map, improved reduce, simplified find, and defined joiner. 2010-07-28 08:02:05 +00:00
Andrei Alexandrescu
80059a1c32 Optimization for fill; added uninitializedFill and initializeAll; changed copy to work with put(r, e) instead of r.put(e). 2010-07-09 03:47:03 +00:00
Andrei Alexandrescu
432e3fdfc8 Replaced std.contracts with std.exception throughout 2010-07-04 22:09:03 +00:00
Andrei Alexandrescu
3c95b5549f Fixed fix for Map.save 2010-07-04 21:40:26 +00:00
Andrei Alexandrescu
4347cae9f5 Unlisted bug in Map.save and a few stylistic changes 2010-07-04 21:04:48 +00:00
David Simcha
09962831b2 More higher order range testing improvements. 2010-07-03 21:42:27 +00:00
David Simcha
18e300d60f @property and infiniteness propagation in std.algorithm. 2010-07-01 02:39:50 +00:00
David Simcha
96aed784bc Bug 3872: std.algorithm.filter could become bidirectional if its input range is bidir 2010-07-01 02:24:58 +00:00
David Simcha
619beee74d Improve unittests for higher order ranges in std.algorithm, fix some unlisted bugs. 2010-06-30 02:30:26 +00:00
David Simcha
6f1dc2378d save() for std.algorithm.filter, WITH proper unittests. 2010-06-23 12:45:32 +00:00
Masahiro Nakagawa
8854724323 bugzilla 4363: std.algorithm.Until is not a forward range 2010-06-23 00:54:07 +00:00
David Simcha
73f91e5d72 Add infiniteness propagation to Map, Filter. 2010-06-18 02:31:03 +00:00
David Simcha
2d576cfb8d Bug 2872: Length, opIndex for Map 2010-06-18 02:18:55 +00:00
Andrei Alexandrescu
7b68030f9b Fixed startsWith regression; replaced heap uses from heap range to heap container 2010-06-10 15:55:46 +00:00
Andrei Alexandrescu
7707f662a8 minor improvement in template constraint 2010-06-08 22:49:54 +00:00
Andrei Alexandrescu
3ea2debb8c Added save() to forward ranges; added split() using only one element as separator; added indexOf; fixed unlisted bug in startsWith and endsWith; added skipOver(); added canFind(). 2010-06-08 17:15:12 +00:00
Walter Bright
9b4dcc1c0e invariant => immutable 2010-05-05 22:21:46 +00:00
Masahiro Nakagawa
a288172908 Add @property to length method. 2010-05-04 21:54:00 +00:00
Andrei Alexandrescu
2a9a6e336c string, wstring are now bidirectional (not random) ranges
std.algorithm: defined move with one argument; levenshtein distance generalized to with all forward ranges; take now has swapped arguments
std.array: empty for arrays is now a @property; front and back for a string and wstring automatically decodes the first/last character; popFront, popBack for string and wstring obey the UTF stride
std.conv: changed the default array formatting from "[a, b, c]" to "a b c"
std.range: swapped order of arguments in take
std.stdio: added readln template
std.variant: now works with statically-sized arrays and const data
std.traits: added isNarrowString
2010-02-22 15:52:31 +00:00
Walter Bright
9d92f3b3af so phobos unittests work again 2009-11-21 07:53:47 +00:00
Don Clugston
b42fa81208 fixed typo in docs 2009-11-20 13:57:39 +00:00
Andrei Alexandrescu
a6e1588b8c Added hasLength requirement to topN; implemented topN for two non-adjacent ranges; added replaceTop function to BinaryHeap; changed BinaryHeap.top to return ref. 2009-10-26 22:35:27 +00:00
Andrei Alexandrescu
391ce8db1e bug in reduce when passed const arguments 2009-10-03 21:24:13 +00:00
Sean Kelly
747f3cf1e4 Changed Phobos to use the Boost license. Currently, all public domain modules and all licensed modules by Walter, Andrei, Bartosz, and Don have been changed to use this license (excepting std.c, for the moment). Ideally, all Phobos modules will eventually be distributed under this license, which means obtaining permission from a few more authors, deleting, or rewriting some modules.
Removed std.openrj.
2009-09-16 18:19:51 +00:00
Andrei Alexandrescu
0c142994d9 See changelog - bunch of bug fixes and a couple additions for release 2.032 2009-08-31 19:46:33 +00:00