teds

Provides extra data structures and iterable/array functionality.


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

License: BSD-3-Clause

Latest releases

Version Release Download
1.2.3 2022-03-06 teds-1.2.3.tgz
1.2.2 2022-03-06 teds-1.2.2.tgz
1.2.1 2022-03-05 teds-1.2.1.tgz
1.2.0 2022-03-04 teds-1.2.0.tgz
1.1.2 2022-02-20 teds-1.1.2.tgz
Show all releases

Changelog

Version Message
1.2.3 * Make pop() on Sequences affect iterators the same way that `$o->offsetUnset(count($o) - 1)` would.
(Move iterators pointing to the removed entry backwards by 1)
* Make pop() on MutableIterable move iterators pointing to that entry backwards.
* Properly convert references to non-references in some Collection constructors/unserializers and `Teds\unique_values()`
1.2.2 * Fix bugs in Teds\StrictHashSet/Teds\StrictHashMap iteration behavior.
* Fix bug constructing balanced tree in Teds\StrictTreeSet/Teds\StrictTreeMap from array/unserializing, where certain sizes resulted in trees not maintaining the balancing invariant.
* Fix bug when constructing Teds\IntVector from array when promoting type but not keeping reserved capacity.
* Fix bugs in Teds\StrictSortedVectorSet::__construct
1.2.1 * Update documentation
* Make iteration of Teds\StrictSortedVectorSet and Teds\StrictSortedVectorMap account for removals and additions.
* Make removal in Teds\StrictTreeSet and Teds\StrictTreeMap move iterators to the previous node if the iterator pointed to the removed node.
Add a state for iterators being prior to the start of the tree.
Use the state of being before the first value of the tree when calling InternalIterator::rewind on an empty tree or removing an iterator pointing to the first value in a tree.
* Make repacking/removals in Teds\StrictHashSet and Teds\StrictHashMap move InternalIterator positions.
* Change iteration behavior of Teds\Deque to be like Vector, make shift/pop behave the same way as offsetUnset with respect to iteration.
(If the iterator is moved to be before the start of the deque, calling next will move it to the front, and other changes to the Deque will have no effect)
1.2.0 * Add `Teds\SortedIntVectorSet` - a Set implementation represented in a way similar to an `Teds\IntVector` with unique sorted integers.
(This may be useful for reducing memory usage and speeding up unserialization, when unserializing large Sets of integers which change infrequently. See benchmarks/benchmark_vector_unserialize.php)
* Add `Teds\ImmutableSortedStringSet` - an immutable Set implementation containing a list of unique strings sorted with strcmp.
(This may be useful for reducing memory usage and speeding up unserialization, when unserializing large Sets of strings which change infrequently to check values for membership in a Set. See benchmarks/benchmark_string_set.php)
* Add `Teds\ImmutableSortedIntSet` - an immutable Set implementation containing a list of unique integers sorted by increasing value.
(This may be useful for reducing memory usage and speeding up unserialization, when unserializing large Sets of integers which change infrequently to check values for membership in a Set.)
* Rename `Teds\BitSet` to `Teds\BitVector`
* Add `Teds\Sequence::insert(int $offset, mixed ...$values)` to the Sequence interfaces and implementations
* Add first/last to the `Teds\Sequence` interface.
* Fix edge cases with var_export/var_dump/debug_zval_dump and cyclic data structures in debug builds and php 8.2.0-dev.
* Make iteration account for offsetUnset/insert/shift/unshift in Sequences.
1.1.2 * Fix big-endian builds (#160)
* Make `teds\stable_compare` consistently 1/0/-1 for arrays with different keys on all platforms.
Show complete changelog