teds extension

teds (Tentative Extra Data Structures) is a collection of data structures and iterable functionality

License: BSD-3-Clause

Latest releases

Version Release Download
0.4.1 2021-09-27 teds-0.4.1.tgz
0.4.0 2021-09-26 teds-0.4.0.tgz
0.3.0 2021-09-19 teds-0.3.0.tgz
0.2.1 2021-09-17 teds-0.2.1.tgz
0.2.0 2021-09-12 teds-0.2.0.tgz
Show all releases


Version Message
0.4.1 * Fix computation of next power of 2 for sizes of `2 ** 32` or larger.
0.4.0 * 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.
0.3.0 * 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.
0.2.1 * Support `$vector[] = $value` and `$deque[] = $value` assignments to append to Vector/Deque.
* Add map() and filter() functions to Vector.
0.2.0 * 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`
Show complete changelog