-
Notifications
You must be signed in to change notification settings - Fork 2
/
CHANGES
235 lines (190 loc) · 18.8 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
[1.7.0]
- [BREAKING] Set and map types no longer guarantee they will have a `hashMultiplier` field, though the getters and setters for that field still exist.
- Some set and map types do still have a `hashMultiplier` field, and are mostly unaffected by the above breakage, including all Filtered and/or CaseInsensitive sets and maps.
- The first change means classes like ObjectSet and IntFloatMap no longer use hash function *families* to mix hash codes, and instead use a multiplication-free bitwise mixer.
- The `remove()` method in maps and sets changed slightly internally, and should be faster. It uses a complex technique that was pulled from Fastutil and seems to have a small speed benefit.
- There are many more overloads of `with()` now; this avoids allocating any array when passing 8 or fewer parameters (for 8 items in a set, or 4 key-value pairs in a map).
- A CharFilter can be used to construct FilteredString sets and maps, or ordered variants, that use that same CharFilter. Use `makeSet()`, `makeMap()`, `makeOrderedSet()`, or `makeOrderedMap()` for this; these act like `with()` but don't need another CharFilter to be looked up.
- OffsetBitSet now uses `int` internally instead of `long`, because GWT is so much slower with `long` math. Various other fixes were applied to OffsetBitSet.
- Some improvements to nullity handling.
- Updated to digital 0.5.4 . This release makes some changes to how Distributor behaves.
- The Gradle version used to build jdkgdxds was updated to 8.11.1, and the daemon was re-disabled while building. This shouldn't affect users.
[1.6.5]
- Added LimitingIterator, which will only iterate through a set amount of items at most.
- Updated to digital 0.5.2, which mostly adds the Distributor class.
- The Gradle version used to build jdkgdxds was updated to 8.10.2, and the daemon was re-enabled while building. This shouldn't affect users.
[1.6.4]
- Most collections can be initialized with an Iterator now, which adds items from the Iterator until it is exhausted.
- You can also use Iterator types in addAll(), removeAll(), and so on.
- There are new Iterator wrappers, including FilteringIterator, StridingIterator, EditingIterator, and primitive variants on each.
- FilteringIterator skips items unless they match a predicate.
- StridingIterator skips a fixed number of items at a time, repeatedly.
- EditingIterator runs a function on each item and returns what that function does.
- Updated to digital 0.5.1, which mostly improves and adds to its Hasher class.
- The Gradle version used to build jdkgdxds was updated to 8.10.1, and the daemon was disabled while building. This shouldn't affect users.
[1.6.3]
- The dependency on digital was updated to 0.5.0, which improves Interpolators and parts of TrigTools.
- The Gradle version used to build jdkgdxds was updated to 8.10, which will allow this to be built with Java 23.
[1.6.2]
- [BREAKING] Because using BitConversion.imul() didn't benchmark as having any speed penalty, but there were potentially-significant collision issues with small hashCode()s and smaller GWT-friendly multipliers, the Utilities.GOOD_MULTIPLIERS table now stores 32-bit ints instead of 21-bit ones. Again.
[1.6.1]
- [SEED BREAKING] Utilities.hashCodeIgnoreCase() returns different results in this version than in the previous version, with the same seed. This has to do with the next bullet point.
- Utilities.GOOD_MULTIPLIERS now holds only smaller ints, which allows place() to avoid calling imul() entirely. This may have some speed implication on any platform, but most likely a small one.
[1.6.0]
- [BREAKING] The protected hashMultiplier field is now an int instead of a long, and it is initialized differently. It also changes differently in resize().
- [BREAKING, MAYBE] Utilities.GOOD_MULTIPLIERS is now an int array instead of a long array, with different contents. This array was unlikely to be used externally, but it is always possible.
- All hash-based collections (maps and sets) now avoid math on longs if possible, because GWT is so slow with long math. This changes the iteration of sets and maps that aren't Ordered, but that iteration wasn't expected to be reliably-ordered anyway.
- There is now an int-based Utilities.hashCodeIgnoreCase() in addition to a Utilities.longHashCodeIgnoreCase().
[1.5.4]
- [BREAKING, SORT OF] PrimitiveCollection.areEqual() was broken, apparently since it was created, and has either been removed where it wasn't properly applicable, or changed to equalContents() for set-like types.
- Massive addition of toString() and related appendTo() code to nearly all classes here.
- PrimitiveSet is a new interface that, like Set in the JDK, marks a PrimitiveCollection as behaving like a Set rather than a List, Deque, or plain Collection.
- EnumMap and EnumSet now allow you to call getUniverse() to get their key universe, most likely to pass it to another EnumMap or EnumSet.
- Updated funderby dependency to 0.1.2 .
- Internally, updated Gradle to 8.8 .
[1.5.3]
- Fixed a bug that affected ObjectDeque.clear(), and could have resulted in crashes.
[1.5.2]
- New EnumMap and EnumSet types are meant to be serializable more easily than their JDK counterparts.
- Updated digital dependency to 0.4.8 .
[1.5.1]
- Almost immediately replaced by 1.5.2.
[1.5.0]
- Almost immediately replaced by 1.5.2.
[1.4.8]
- Deque types can be initialized with capacity 0, and now won't suddenly crash when an item is added.
- Almost every type got some new methods, thanks to PrimitiveCollection adding overloads that take arrays or ranges of arrays.
- The above change was also applied manually to Object-based Collection types.
- Where appropriate, types have removeAll() and removeEach(), as well as containsAll() and containsAny().
[1.4.7]
- The dependency on digital was updated to 0.4.7, which adds some potentially useful features, and has many more null checks.
- Filtered sets and maps have the full range of constructors that maps and sets usually have, now.
- The Filtered-String sets and maps use a different hashing algorithm now that takes advantage of how small a char is relative to a long.
[1.4.6]
- [BREAKING CHANGE] The Filtered-String sets and maps now use a CharFilter object to group their filter and editor, allowing them to be serialized and deserialized.
[1.4.5]
- The dependency on digital was updated... again... to 0.4.5, though this time it brings several new features. None used here.
- Filtered-String sets and maps! These are like the CaseInsensitive ones, but allow configuring how characters are used and modified.
- Filtered-Iterable sets and maps, too! These are like the Filtered-String ones but work on an Iterable of sub-items instead of a String of characters.
- FilteredComparators provides ways to sort the ordered filtered types.
- NumberedSet.addOrIndex() was broken, and now is fixed.
- Nullity annotations were put in the right places pretty much everywhere.
[1.4.4]
- The dependency on digital was updated again to 0.4.3 because of a break in GWT compilation in digital 0.4.2; it is fine now.
[1.4.3]
- The dependency on digital was updated to 0.4.2, which includes `BitConversion.countTrailingZeros()`; we use it in OffsetBitSet.
- A bug in getAndIncrement() for ordered maps with int and long keys was fixed; before, it didn't handle zero keys correctly.
- The `Utilities.longHashCodeIgnoreCase()` methods now are much closer to how `Hasher` implements them in digital; the results are different.
[1.4.2]
- The dependency on digital was updated to 0.4.1, which includes a new `BitConversion.countLeadingZeros()` method that we use here to speed things up on GWT a bit.
- The dependency on checker-qual was updated to 3.39.0, which shouldn't break or really even change anything here.
[1.4.1]
- [POSSIBLE BREAKING CHANGE] The dependency on digital was increased to 0.4.0, and that version changes what `Hasher.hash()` and `Hasher.hash64()` return for the same arguments. This doesn't affect jdkgdxds code, but may affect users who rely on digital transitively.
- New `ObjectList.sortJdk()` method will use the default `List.sort()` method rather than the in-place mergesort used by `ObjectList.sort()`.
- Updated to Gradle 8.3 and Checker Framework 3.37.0 .
[1.4.0]
- [BREAKING CHANGE] Optionally-implemented merge() methods on primitive-keyed-and-or-valued map types didn't act according to Map.merge() docs, so they are now renamed to combine(). Calling combine() should always take a funderby functional interface.
- All maps should be able to be combined with another map of the same type, using combine(). This complements the combine() that merges two values to associate with a single key.
- No-arg overloads of with() are present on most maps now. Sets could already handle the no-arg case.
- The test sources have a com.github.tommyettinger.ds.enums package that holds enum-keyed maps and sets, which can be copied into your code if you want them. They're probably slightly more efficient than using an Object-keyed map with enums.
[1.3.2]
- Updated dependency on digital to 0.3.3 because it has a critical fix for GWT projects. Other targets are unaffected.
[1.3.1]
- Removed extra Gradle dependency on digital and funderby sources JARs; this sometimes caused issues in downstream projects.
[1.3.0]
- [BREAKING CHANGE] Updated Funderby to 0.1.0; this update removes some unnecessary ThingToBoolean types, so is sort-of incompatible if you use those instead of ThingPredicate types. Lambdas will just be equivalent to the ThingPredicate types.
- [BREAKING CHANGE] All Java 8 APIs in the project have been replaced by versions defined here or in Funderby; this should help RoboVM compatibility.
- [BREAKING CHANGE] While in earlier versions, FloatIterator from this library was mixed with PrimitiveIterator.OfInt/OfLong, now all iterator types are defined here for RoboVM compatibility. They are all in the package com.github.tommyettinger.ds.support.util .
- None of the primitive iterators implement the Java 8 PrimitiveIterator interface, but they all do implement Iterator.
- The Override annotation is still present on some overrides of methods added in Java 8, but RoboVM seems to ignore Override.
[1.2.2]
- Fix the clear() method in primitive-keyed maps, which previously did not remove the 0 key.
- In IntObjectMap, LongObjectMap, and their Ordered relatives, values are now set to null when clear() is called, to permit garbage collection.
[1.2.1]
- Fixed ObjectList.equals(); in 1.2.0 it would almost never return true.
[1.2.0]
- [BREAKING CHANGE] The insertRange() method in the primitive lists is now named the duplicateRange() method, as it was in ObjectList already.
- [BREAKING CHANGE] Several sorting methods in BooleanList have (finally) been moved to BooleanComparators, which was done for other primitive types much earlier.
- There is now an unordered Bag class that extends each List class here.
- General cleanup was done on the various List classes, so they're all more similarly-structured inside.
- The retainAll() method in primitive lists now can receive any PrimitiveCollection of the appropriate type.
- In the equals() and equalsIdentity() methods for lists, a list (or bag) being unordered will no longer disqualify it from equality comparison.
- digital has been updated to 0.2.0 .
[1.1.3]
- [BREAKING CHANGE] The .gwt.xml file has moved to `src/main/resources/com/github/tommyettinger/jdkgdxds.gwt.xml` in the repo.
- [BREAKING CHANGE] In GWT projects, you must now depend on jdkgdxds using `<inherits name="com.github.tommyettinger.jdkgdxds" />` .
- digital has been updated to 0.1.8, and its inherit also changed.
- funderby has been updated to 0.0.2, and its inherit also changed.
[1.1.2]
- Immediately replaced by 1.1.3, above.
[1.1.1]
- [BREAKING CHANGE] The dependency on JSR305 (for nullity annotations) has changed to checker-qual.
- The strategy for choosing a hashMultiplier (for maps and sets) is more robust now, and chooses from a large array of known-good multipliers.
- Added IdentitySet and IdentityOrderedSet.
- Several fixes in HolderSet and HolderOrderedSet.
[1.1.0]
- OffsetBitSet is the main new addition in this version; it is a fairly standard bitset, so it acts like an implicitly sorted int set, but unlike typical bitsets, it allows choosing an offset where it should start permitting items.
- ObjectComparators can sort Object arrays now.
- Sets have an appendTo() method that places some or all of the String representation into a StringBuilder, with minimal allocation.
- The iterators for sets, for map entry sets, for map key sets, and for map value collections all can produce a list of the remaining items, with toList() .
- In addition to the above toList() , there is appendInto() for those iterators, which allows placing the remaining items from the iterator into any compatible collection.
- To make the iterators' new methods more useful, you can call resetIterator() on a map's entry set/key set/value collection, which sets the iterator back to the start.
- jdkgdxds depends on digital version 0.1.5 now. If you use juniper, using 0.1.7 or higher is suggested (that's what the tests use here).
[1.0.5]
- Many fixes for deques, affecting/improving removeAt(), add() with an index, iteration, and default values.
- The iterators for all lists, all deques, and for NumberedSet are all effectively ListIterators now, or share the same API. If you need a ListIterator for an ordered set or an ordered map's keys, call .order().iterator() .
[1.0.4]
- [BREAKING CHANGE] jdkgdxds now depends on funderby (version 0.0.1), a small new library that only contains primitive-based functional interfaces. This replaces the functional interfaces for primitives here. This is breaking because the package changed for the functional interfaces.
[1.0.3]
- [BREAKING CHANGE] jdkgdxds no longer depends on juniper. The one case where we still used it was in Arrangeable.rearrange(EnhancedRandom), which now takes a long seed instead.
- The simple random hash family now incorporates the current size of the map or set at the time of a resize.
[1.0.2]
- No more Fibonacci hashing; now we use a simple random hash family that changes hash function on resize.
[1.0.1]
- [SMALL BREAKING CHANGES] The core math code in BitConversion is now part of its own small math utility library, `digital`. It is a dependency.
- [SMALL BREAKING CHANGES] EnhancedRandom is now an abstract class, and has moved to the dependency `juniper`. All generators have also moved.
- [BREAKING CHANGE] The shuffle() method in EnhancedRandom that took an Arrangeable has been moved to Arrangeable, taking an EnhancedRandom.
[1.0.0]
- See 1.0.1 .
[0.2.8]
- New truncate() method on maps and sets allows removing items aggressively to fit a desired smaller size.
- The shrink() method in maps and sets now does extra checks to prevent a failure state with many more items than the load factor allows.
[0.2.3]
- [BREAKING CHANGE] EnhancedRandom.nextInt(int, int) and nextSignedInt(int, int) were still broken when outerBound was less than innerBound; this has been fixed, but these methods will return different values now.
- Fix the iterators for int- and long-keyed maps; there was a name-shadowing issue that made iteration stop immediately in some non-empty maps.
- Added BooleanDeque, rounding out the primitive deques.
- Added with(), minHeapWith(), and maxHeapWith() to BinaryHeap, to make building one a little easier.
[0.2.2]
- The recently-added Base class wasn't case-insensitive when it was supposed to be, and now it is correct.
[0.2.1]
- [BREAKING CHANGE] EnhancedRandom.nextInt(int, int) and nextSignedInt(int, int) were sometimes broken with two very-distant arguments, but now behave correctly. This changes the output of two-argument calls only.
- The nice, human-readable natural sort is available as an option in NaturalTextComparator.
- Int and long hashing is back to using Fibonacci hashing, because not having it showed severe performance loss on some key sets.
- New StrangerRandom number generator doesn't use multiplication and is fairly fast/very-high-quality.
- Added the Xoshiro256** random number generator, which is present in Java 17 but unavailable to non-desktop platforms without this or similar code.
- Base provides configurable numeral base systems, such as hexadecimal and base-64, along with the option to scramble the base for light obfuscation.
[0.2.0]
- Fixed how `ObjectArray.sort()` works on Android across all versions. This was a potentially serious problem because of flaws in the Android library design.
- Added FourWheelRandom as yet another choice of EnhancedRandom; this is the fastest so far on Java 16 with HotSpot, and has four `long`s of state.
- Many convenience methods and important constructors in the deque classes, such as `with()` and copy constructors.
- EnhancedRandom now optionally provides a `previousLong()` method, which steps the generator backwards; all generators here implement it.
- There is now an equate() method that can be overridden in all maps and sets, to change how equality is compared. This replaces the usage of locateKey() for the same task.
- This release does not use Fibonacci hashing for any keys, though comments show how to implement it.
[0.1.3]
- [BREAKING CHANGE] TricycleRandom needed its algorithm changed to improve its quality for some problem seeds; performance is pretty much unaffected.
- Deque types everywhere! These are double-ended queues that also allow getting and setting internal items in constant time, though not inserting into the middle.
- There are primitive Deque types too, for all types but boolean (there's no space savings for using booleans over bytes, and we have a ByteDeque).
- The `nextGaussian()` method in EnhancedRandom is different and faster now, avoiding a call to `probit()` by using an approximation by Marc B. Reynolds.
- Internal sorting code has been moved to the `com.github.tommyettinger.ds.support.sort` package, in the Comparators classes; this lets sorting apply to deques.
[0.1.2]
- [BREAKING CHANGE] The `setIndex()` methods in the ordered maps have been renamed to `setAt()` because they don't affect any index.
- The `putOrDefault()` and `getAndIncrement()` methods in ordered maps have been fixed or improved.
- There are `first()` methods in all PrimitiveCollection types now, which can be used even if the type isn't ordered (which gets an arbitrary item in that case).
- EnhancedRandom has some new methods; `equals()` and `toString()` are always useful, and `setWith()` allows copying another EnhancedRandom into the current one.
- DistinctRandom provides another choice of EnhancedRandom; it can't produce the same value twice without being reseeded or years of random number generation passing.
[0.1.1]
- [BREAKING CHANGE] Randomized algorithms no longer use a `java.util.Random`, and instead take a `com.github.tommyettinger.ds.support.EnhancedRandom`.
- API addition: EnhancedRandom#nextInclusiveDouble(), EnhancedRandom#nextExclusiveDouble(), float versions of those, and Equidistant versions are all added.
- GWT support has been fixed; it probably never worked before.
[0.1.0]
- First release published to Maven Central.