All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
BREAKING CHANGES
- 4-element sorting network for arrays of doubles.
- 4-element sorting network for arrays of ints.
- Replaced PriorityQueueNode.Integer with a Java record class IntegerPriorityQueueNode for immutability and to eliminate the name clash with the Java API class Integer (BREAKING CHANGE).
- Replaced PriorityQueueNode.Double with a Java record class DoublePriorityQueueNode for immutability and to eliminate the name clash with the Java API class Double (BREAKING CHANGE).
- Removed PriorityQueueNode class and its nested classes (BREAKING CHANGE).
- Refactored Prioritizer and implementations, an internal interface and classes related to priority queue implementations.
- Refactored IntBinaryHeap based on RefactorFirst report.
- Refactored IntBinaryHeapDouble based on RefactorFirst report.
- Refactored IntFibonacciHeap based on RefactorFirst report.
- Refactored IntFibonacciHeapDouble based on RefactorFirst report.
- Refactored SimpleFibonacciHeap based on RefactorFirst report.
- Refactored SimpleFibonacciHeapDouble based on RefactorFirst report.
- Minimum supported Java 25 (BREAKING CHANGE).
- Migrated deployment from the old OSSRH to the new Central.
- SimpleSwapper: utility class for swapping elements within an array
- ValidatedSwapper: utility class for swapping elements within an array, which verifies indexes are different before attempting swap
- SortingNetwork class, with the following:
- compareExchange methods for arrays of doubles and ints
- 3-element sorting networks
- Removed support for importing from JitPack.
- Integrated SpotBugs static analysis into build process.
- Integrated Find Security Bugs static analysis into build process.
- Removed JitPack related configuration and steps of workflows.
- DoubleArray
- IntegerArray
- Minor code improvements to add and remove methods of IntegerList and DoubleList.
- Optimized buffer reallocation and other related internal code in: IntegerList, DoubleList, BinaryHeap, BinaryHeapDouble, SimpleBinaryHeap, SimpleBinaryHeapDouble.
- Refactored all Fibonacci heap classes.
- Refactored all priority queue classes to optimize and make other code improvements to priority-order determination.
- Refactored SimpleFibonacciHeap to reduce cyclomatic complexity, among other maintainability improvements.
- Additional refactoring of SimpleFibonacciHeapDouble for further improvements over 2.4.1.
- Refactored equals method in the SimpleFibonacciHeap, FibonacciHeap, SimpleBinaryHeap, BinaryHeap classes.
- Refactored equals method in the SimpleFibonacciHeapDouble, FibonacciHeapDouble, SimpleBinaryHeapDouble, BinaryHeapDouble classes.
- Reformatted all code to follow Google's Java style.
- Refactored test cases for SimpleFibonacciHeap, FibonacciHeap, SimpleBinaryHeap, BinaryHeap.
- Refactored test cases for SimpleFibonacciHeapDouble, FibonacciHeapDouble, SimpleBinaryHeapDouble, BinaryHeapDouble.
- Refactored test cases for IntFibonacciHeapDouble, IntBinaryHeapDouble.
- Refactored test cases for IntFibonacciHeap, IntBinaryHeap.
- Configured refactor-first-maven-plugin in the library's pom.xml.
- Adopted Google's Java style.
- Configured Spotify's fmt-maven-plugin in the library's pom.xml.
- Refactored SimpleFibonacciHeapDouble to reduce cyclomatic complexity, among other maintainability improvements.
- ArrayLengthEnforcer: utility class that validates array length equal to target, reallocating if necessary.
- ArrayMinimumLengthEnforcer: utility class that validates array length at least a minimum target, reallocating if necessary.
- ArrayFiller: utility class for creating and/or filling int arrays with consecutive integers.
- SimpleBinaryHeap class: a basic implementation of a binary heap with integer priorities that allows duplicate elements (unlike the BinaryHeap class), but lacks constant time lookups and thus lacks the speed advantage for operations like priority changes that constant time lookups provide.
- SimpleBinaryHeapDouble class: a basic implementation of a binary heap with double priorities that allows duplicate elements (unlike the BinaryHeapDouble class), but lacks constant time lookups and thus lacks the speed advantage for operations like priority changes that constant time lookups provide.
- SimpleFibonacciHeap class: a basic implementation of a Fibonacci heap with integer priorities that allows duplicate elements (unlike the FibonacciHeap class), but lacks constant time lookups and thus lacks the speed advantage for operations like priority changes that constant time lookups provide.
- SimpleFibonacciHeapDouble class: a basic implementation of a Fibonacci heap with double priorities that allows duplicate elements (unlike the FibonacciHeapDouble class), but lacks constant time lookups and thus lacks the speed advantage for operations like priority changes that constant time lookups provide.
- PriorityQueue.pollThenAdd and PriorityQueueDouble.pollThenAdd methods, including default implementation in the interfaces, and overridden implementation in the binary heap classes that exploit binary heap structure.
- IntegerList.sort() and DoubleList.sort() methods.
- Improved javadoc documentation in the PriorityQueue and PriorityQueueDouble interfaces, and the various classes that implement them.
- Refactored FibonacciHeap as a subclass of the new SimpleFibonacciHeap.
- Refactored FibonacciHeapDouble as a subclass of the new SimpleFibonacciHeapDouble.
- Triggering JitPack build on release. No changes in this release.
- Configured JitPack build to use JitPack as a backup source of artifacts. No changes in this release.
- MergeablePriorityQueue interface for priority queues with merge support.
- MergeablePriorityQueueDouble interface for priority queues with merge support.
- BinaryHeap.merge(BinaryHeap) for merging binary heaps with int priorities.
- BinaryHeapDouble.merge(BinaryHeapDouble) for merging binary heaps with double priorities.
- FibonacciHeap.merge(FibonacciHeap) for merging Fibonacci heaps with int priorities.
- FibonacciHeapDouble.merge(FibonacciHeapDouble) for merging Fibonacci heaps with double priorities.
- Improved implementation of BinaryHeap.retainAll(Collection) to an O(m + n) runtime.
- Improved implementation of BinaryHeapDouble.retainAll(Collection) to an O(m + n) runtime.
- Improved implementation of BinaryHeap.removeAll(Collection) to an O(m + n) runtime.
- Improved implementation of BinaryHeapDouble.removeAll(Collection) to an O(m + n) runtime.
- Improved implementation of BinaryHeap.addAll(Collection) to an O(m + n) runtime.
- Improved implementation of BinaryHeapDouble.addAll(Collection) to an O(m + n) runtime.
- Improved implementation of FibonacciHeap.retainAll(Collection) to an O(m + n) runtime.
- Improved implementation of FibonacciHeapDouble.retainAll(Collection) to an O(m + n) runtime.
- Improved implementation of FibonacciHeap.removeAll(Collection) to an O(m + n) runtime.
- Improved implementation of FibonacciHeapDouble.removeAll(Collection) to an O(m + n) runtime.
- Default implementation of PriorityQueue.removeAll(Collection): All relevant classes now implement this directly.
- Default implementation of PriorityQueueDouble.removeAll(Collection): All relevant classes now implement this directly.
- FibonacciHeap: implements PriorityQueue with a Fibonacci heap for both min-heap and max-heap cases.
- FibonacciHeapDouble: implements PriorityQueueDouble with a Fibonacci heap for both min-heap and max-heap cases.
- IntFibonacciHeap: implements IntPriorityQueue with a Fibonacci heap for both min-heap and max-heap cases.
- IntFibonacciHeapDouble: implements IntPriorityQueueDouble with a Fibonacci heap for both min-heap and max-heap cases.
- Added promote and demote methods to the PriorityQueue, PriorityQueueDouble, IntPriorityQueue, IntPriorityQueueDouble interfaces for changing priorities strictly in one direction, and implemented in the various heap classes.
- Altered change method of the PriorityQueue, PriorityQueueDouble, IntPriorityQueue, IntPriorityQueueDouble interfaces, and of the classes that implement them to return a boolean rather than void.
- Refactored IntBinaryHeap and IntBinaryHeapDouble to improve max-heap implementation.
- Bug in BinaryHeap and BinaryHeapDouble with potential to break encapsulation.
BREAKING CHANGES: See changes section for details. Breaking changes include increasing minimum supported Java version to Java 17.
- DisjointSetForest: representation of disjoint sets of generic objects.
- DisjointIntegerSetForest: representation of disjoint sets of integers with a disjoint set forest.
- PriorityQueue: interface for priority queues with int-valued priorities.
- PriorityQueueDouble: interface for priority queues with double-valued priorities.
- BinaryHeap: implements PriorityQueue with binary heap for both min-heap and max-heap cases.
- BinaryHeapDouble: implements PriorityQueueDouble with binary heap for both min-heap and max-heap cases.
- IntPriorityQueue: interface for priority queues of int elements with int-valued priorities.
- IntPriorityQueueDouble: interface for priority queues of int elements with double-valued priorities.
- IntBinaryHeap: implements IntPriorityQueue with binary heap for both min-heap and max-heap cases.
- IntBinaryHeapDouble: implements IntPriorityQueueDouble with binary heap for both min-heap and max-heap cases.
- Minimum supported Java version is now Java 17.
- Migrated test cases to JUnit Jupiter 5.8.2.
- IntegerList class, which is a partially-filled array of primitive int values.
- DoubleList class, which is a partially-filled array of primitive double values.
- This initial release has only the Copyable interface. More will be added in the near future.