* Make `Teds\stable_compare` sort objects by class name with strcmp before sorting by spl_object_id.
* Add a hash map `StrictMap` using `Teds\stable_hash` as a hash algorithm.
Keys are returned in order of insertion.
* Add a hash set `StrictSet` using `Teds\stable_hash` as a hash algorithm.
* Add a sorted map `SortedStrictMap` using `Teds\stable_compare` as a comparison function.
Keys are returned ordered by `Teds\stable_compare` and no two keys have `stable_compare` return 0 (i.e. no two keys are equivalent).
* Add a sorted set `SortedStrictSet` using `Teds\stable_compare` as a comparison function.
* Add StableMinHeap/StableMaxHeap extending SplMinHeap/SplMaxHeap, using `Teds\stable_compare` as a comparison function.
* Add Teds\array_value_first(), Teds\array_value_last()
* Add `Teds\stable_compare($v1, $v2): int` for a stable comparison function of arbitrary values. (see tests/misc/stable_compare.phpt).
Like strcmp, this returns a negative value for less than, and positive for greater than, and 0 for equality.
Note that php's `<` operator is not stable. `'10' < '0a' < '1b' < '9' < '10'`.
stable_compare fixes that by strictly ordering:
`null < false < true < int,float < string < array < object < resource`.
(objects and resources are compared by id, and arrays are compared recursively. Numbers are compared numerically. If an int is equal to a float, then the int is first)
(strings use strcmp)
* Make Deque iteration account for calls to shift/unshift tracking the position of the front of the Deque.
Calls to shift/unshift will do the following:
- Increase/Decrease the value returned by the iterator's key() by the number of elements added/removed to/from the front of the Deque. (`$deque[$iteratorKey] === $iteratorValue` at the time the key and value are returned).
- Repeated calls to shift will cause valid() to return false if the iterator's position ends up before the start of the Deque at the time iteration resumes.
- They will not cause the remaining values to be iterated over more than once or skipped.
|0.4.1||* Fix computation of next power of 2 for sizes of `2 ** 32` or larger.|
* Backwards incompatible change: Change `Deque` APIs to be consistent with SplDoublyLinkedList and `array_push`: change pushBack/popBack/pushFront/popFront to push/pop/unshift/shift
* Backwards incompatible change: Remove `$preserve_keys` flag from `Vector::__construct` (Always reindex keys in order of iteration instead).
* Add isEmpty() method to datastructures
* Make exceeding the capacity limit for a vector a fatal error.
* Make Deque::push() and unshift() variadic.
* Backwards incompatible change: Change `Vector::indexOf` return type from `int|false` to `?int` (and all other `indexOf*` methods in other data structures)
* Backwards incompatible change: Change `valueAt`/`setValueAt` to get/set in Deque, Vector, and ImmutableSequence
* Add optional parameter `$value = null` to `Vector::setSize()` to allow overriding the value used for padding when lengthening an array.
* Change exception handling for sizes/capacities that are definitely too large to allocate.
* Make Vector::push() variadic and accept 0 or more arguments, like `array_push` does.
* Reclaim unused memory in Deque when roughly a quarter or less of the internal buffer is used.
* Optimize performance of Deque, always use powers of 2 for the capacity of Deque to speed up reads/writes.
* Support `$vector = $value` and `$deque = $value` assignments to append to Vector/Deque.
* Add map() and filter() functions to Vector.
* Breaking change: Change `Teds\Vector::__construct` to add an additional parameter `bool $preserveKeys = true`,
and use the original keys of arrays/Traversables by default, throwing for non-integers and invalid integer offsets.
(Similar to the behavior of SplFixedArray::fromArray)
* Convert references to non-references when creating values from iterables.
* Minor performance improvements of `Teds\Vector`
* Add Teds\KeyValueVector
* Fix edge cases in Teds\Vector setSize
|0.1.0a1||* Initial commit|