Commit graph

577 commits

Author SHA1 Message Date
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
Andrei Alexandrescu
55540d9286 added more unittests and checks for user-based comparison passed to topN 2009-07-11 18:54:47 +00:00
Andrei Alexandrescu
6f8117a54b Made std.algorithm.swap faster by having it use memcpy; added std.algorithm.group, std.algorithm.until, std.algorithm.nWayUnion, std.algorithm.largestPartialIntersectionWeighted; added additional constraints to std.algorithm.equal; changed signature of std.algorithm.topNIndex and std.algorithm.topNCopy to use an enum parameter instead of a confusing bool. 2009-07-04 06:50:52 +00:00
Andrei Alexandrescu
edd4c82776 minor 2009-05-01 00:59:41 +00:00
Andrei Alexandrescu
ee67c6cb0e documentation 2009-04-30 20:56:52 +00:00
Andrei Alexandrescu
574af5bf3e Improved BinaryHeap. Added largestPartialIntersection. 2009-04-30 19:26:24 +00:00
Andrei Alexandrescu
23ea0fcfd5 Added variadic arguments for setUnion and setIntersection. Added function setSymmetricDifference. 2009-04-30 03:03:47 +00:00
Andrei Alexandrescu
54dea3d01e minor 2009-04-29 22:04:19 +00:00
Andrei Alexandrescu
2a1def14ff Made Splitter bidirectional. Also, Splitter now return an empty item at the end of the iteration if the input ends with a separator. 2009-04-29 21:28:55 +00:00
Andrei Alexandrescu
12c0a9d7bd Added minPos 2009-04-23 08:57:31 +00:00
Andrei Alexandrescu
71be590ef6 Fixed documentation for completeSort 2009-04-20 13:51:36 +00:00
Andrei Alexandrescu
04a3e40b2e minor 2009-04-19 17:20:58 +00:00
Andrei Alexandrescu
dfef2a7214 Replaced next, retreat, head, and toe with (respectively) popFront, popBack, front, and back 2009-04-13 19:10:58 +00:00
Andrei Alexandrescu
0e0c15aa4b 2009-04-06 05:48:05 +00:00
Andrei Alexandrescu
3ad106a063 $(Simplified $(B std.algorithm) by fusing together higher-order functions taking an alias and their counterparts taking a string.) 2008-07-08 03:12:47 +00:00
Walter Bright
5cfb0c353c some AA allocation improvements 2008-06-16 21:47:37 +00:00
Andrei Alexandrescu
54241153b1 Made map curryable 2008-05-16 21:03:56 +00:00
Andrei Alexandrescu
1ae5300f52 * std.algorithm: Changed the map() function so that it deduces the return type
* std.contracts: Added file and line information to enforce. Added errnoEnforce that reads and formats a message according to errno. Added corresponding ErrnoException class.

* std.encoding: For now commented out std.encoding.to. 

* std.file: Fixed bug 2065

* std.format: Fixed bug in raw write for arrays

* std.getopt: Added new option stopOnFirstNonOption. Also automatically expand dubious option groups with embedded in them (useful for shebang scripts)

* std.math: improved integral powers

* std.md5: Improved signature of sum so it takes multiple arrays. Added getDigestString.

* std.path: changed signatures of test functions from bool to int. Implemented rel2abs for Windows. Improved join so that it accepts multiple paths. Got rid of some gotos with the help of scope statements.

* std.process: added getenv and setenv. Improved system() so it returns the exit code correctly on Linux.

* std.random: added the dice function - a handy (possibly biased) dice.

* std.file: added support for opening large files (not yet tested)

* std.utf: added the codeLength function. Got rid of some gotos.
2008-05-06 05:08:52 +00:00
Andrei Alexandrescu
7564c12a15 Changed version(Unittest) to version(unittest) 2008-03-06 22:40:15 +00:00
Andrei Alexandrescu
e45ee30716 * Made some imports conditional for the Unittest version
* Fixed doc typo

* Made min and max always return the tightest type and work with mixes of signed and unsigned

* Changed enum value names to obey lowercase convention

* Changed OrderStrategy with SwapStrategy as it's not just for ordering (e.g. see eliminate)

* Changed nthElement to topN

* Removed spurious unittest-related code from sort

* Replaced makeIndex with the more flexible partialIndex

* Commented out schwartzMakeIndex for now

* Added schwartzIsSorted

* Removed spurious test code from lowerBound, upperBound
2008-03-06 20:07:18 +00:00
Andrei Alexandrescu
29f3cc23f7 std.math: minor change in approxEqual.
std.contracts: added functions pointsTo()

std.numeric: minor unittest fixes.

std.bitmanip: fixed code bloat issue, reintroduced FloatRep and DoubleRep.

std.conv: minor simplification of implementation.

std.regexp: added reference to ECMA standard in the documentation.

std.getopt: changed return type from bool to void, error is signaled by use of exceptions.

std.functional: added unaryFun, binaryFun, adjoin.

std.string: updated documentation, changed code to compile with warnings enabled.

std.traits: changed FieldTypeTuple; added RepresentationTypeTuple, hasAliasing; fixed bug 1826; added call to flush() from within write; fixed unlisted bug in lines().

std.algorithm: added map, reduce, filter, inPlace, move, swap, overwriteAdjacent, find, findRange, findBoyerMoore, findAdjacent, findAmong, findAmongSorted, canFind, canFindAmong, canFindAmongSorted, count, equal, overlap, min, max, mismatch, EditOp, none, substitute, insert, remove, levenshteinDistance, levenshteinDistanceAndPath, copy, copyIf, iterSwap, swapRanges, reverse, rotate, SwapStrategy, Unstable, Semistable, Stable, eliminate, partition, nthElement, sort, schwartzSort, partialSort, isSorted, makeIndex, schwartzMakeIndex, lowerBound, upperBound, equalRange, canFindSorted.

std.thread: fixed so it compiles with warnings enabled.

std.file: made getSize() faster under Linux.

std.random: fixed so it compiles with warnings enabled; improved function uniform so it deduces type generated from its arguments.

std.format: added fixes to make formatting work with const data.

std.path: minor documentation changes.
2008-02-19 07:00:56 +00:00
Brad Roberts
97002975bb dos -> unix line ending conversion
fix up properties on relatively new files to keep the right line endings
remove the executable bit from std/getopt.d
2008-02-10 08:44:17 +00:00
Walter Bright
e5c065b46e removed final from variable declarations 2008-01-28 07:06:00 +00:00
Brad Roberts
09916d399a Initial merge of candidate to trunk for r459:513 2007-11-27 20:28:40 +00:00