From 66afbabaf94c2da2a108942ad971e4c6a2db724c Mon Sep 17 00:00:00 2001 From: "Vincent A. Cicirello" Date: Fri, 18 Nov 2022 15:00:04 -0500 Subject: [PATCH 1/2] implement SequenceSampler interface --- .../sequences/SequenceInsertionSampler.java | 117 ++++++- .../cicirello/sequences/SequenceSampler.java | 307 ------------------ .../sequences/SequenceSamplerByteTests.java | 3 +- .../sequences/SequenceSamplerCharTests.java | 3 +- .../sequences/SequenceSamplerDoubleTests.java | 3 +- .../sequences/SequenceSamplerFloatTests.java | 3 +- .../sequences/SequenceSamplerIntTests.java | 3 +- .../sequences/SequenceSamplerLongTests.java | 3 +- .../sequences/SequenceSamplerObjectTests.java | 3 +- .../sequences/SequenceSamplerShortTests.java | 3 +- .../sequences/SequenceSamplerStringTests.java | 3 +- 11 files changed, 130 insertions(+), 321 deletions(-) diff --git a/src/main/java/org/cicirello/sequences/SequenceInsertionSampler.java b/src/main/java/org/cicirello/sequences/SequenceInsertionSampler.java index 9f40af44..5323d296 100644 --- a/src/main/java/org/cicirello/sequences/SequenceInsertionSampler.java +++ b/src/main/java/org/cicirello/sequences/SequenceInsertionSampler.java @@ -26,8 +26,7 @@ import org.cicirello.util.ArrayMinimumLengthEnforcer; /** - * SequenceInsertionSampler is a class of utility methods for efficiently generating random samples - * of array elements, without replacement. + * SequenceInsertionSampler generates random samples of array elements, without replacement. * *

The methods of this class implement the insertion sampling algorithm described in: * @@ -45,10 +44,118 @@ * @author Vincent A. Cicirello, https://www.cicirello.org/ */ -public final class SequenceInsertionSampler extends AbstractSequenceSampler { +public final class SequenceInsertionSampler extends AbstractSequenceSampler + implements SequenceSampler { - /** Class of static utility methods so prevent instantiation with a private constructor. */ - private SequenceInsertionSampler() {} + private final RandomGenerator r; + + /** + * Constructs a sampler wrapping a RandomGenerator used as the source of randomness. + * + * @param r The source of randomness. + */ + public SequenceInsertionSampler(RandomGenerator r) { + this.r = r; + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public int[] nextSample(int[] source, int k, int[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public long[] nextSample(long[] source, int k, long[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public short[] nextSample(short[] source, int k, short[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public byte[] nextSample(byte[] source, int k, byte[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public double[] nextSample(double[] source, int k, double[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public float[] nextSample(float[] source, int k, float[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public char[] nextSample(char[] source, int k, char[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length() + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public char[] nextSample(String source, int k, char[] target) { + return sample(source, k, target, r); + } + + /** + * {@inheritDoc} + * + * @throws IllegalArgumentException if k > source.length + * @throws NegativeArraySizeException if k < 0 + */ + @Override + public T[] nextSample(T[] source, int k, T[] target) { + return sample(source, k, target, r); + } /** * Generates a random sample of k elements, without replacement, from a given source array. All n diff --git a/src/main/java/org/cicirello/sequences/SequenceSampler.java b/src/main/java/org/cicirello/sequences/SequenceSampler.java index fd656b74..d6c74674 100644 --- a/src/main/java/org/cicirello/sequences/SequenceSampler.java +++ b/src/main/java/org/cicirello/sequences/SequenceSampler.java @@ -638,311 +638,4 @@ public static float[] sample(float[] source, int k, float[] target) { public static T[] sample(T[] source, int k, T[] target) { return SequenceCompositeSampler.sample(source, k, target, ThreadLocalRandom.current()); } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static int[] sampleInsertion(int[] source, int k, int[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static long[] sampleInsertion(long[] source, int k, long[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static short[] sampleInsertion(short[] source, int k, short[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static byte[] sampleInsertion(byte[] source, int k, byte[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static char[] sampleInsertion(char[] source, int k, char[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k chars, without replacement, from a given source String. All n - * choose k combinations are equally likely, where n is the length of the source String. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source to sample. - * @param k The number of random samples (must be no greater than source.length()). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length() - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static char[] sampleInsertion(String source, int k, char[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static double[] sampleInsertion(double[] source, int k, double[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static float[] sampleInsertion(float[] source, int k, float[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } - - /** - * Generates a random sample of k elements, without replacement, from a given source array. All n - * choose k combinations are equally likely, where n is the length of the source array. - * - *

This implements the insertion sampling algorithm described in: - * - *

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving - * Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June - * 2022). doi:10.3390/app12115506 - * - *

The runtime is O(k2) and it generates O(k) random numbers. Thus, it is a better - * choice than both sampleReservoir and samplePool when k2 < n. Just like - * sampleReservoir, the sampleInsertion method only requires O(1) extra space, while samplePool - * requires O(n) extra space. - * - *

This method uses ThreadLocalRandom as the pseudorandom number generator, and is thus safe, - * and efficient (i.e., non-blocking), for use with threads. - * - * @deprecated This method is deprecated, and replaced by the {@link SequenceInsertionSampler} - * class. - * @param source The source array to sample. - * @param k The number of random samples (must be no greater than source.length). - * @param target An array to hold the result. If target is null or target.length is less than k, - * then this method will construct a new array for the result. - * @param The type of array elements. - * @return An array containing the random sample. - * @throws IllegalArgumentException if k > source.length - * @throws NegativeArraySizeException if k < 0 - */ - @Deprecated - public static T[] sampleInsertion(T[] source, int k, T[] target) { - return SequenceInsertionSampler.sample(source, k, target, ThreadLocalRandom.current()); - } } diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerByteTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerByteTests.java index ad5e36a8..f43ecf13 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerByteTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerByteTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerCharTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerCharTests.java index 7e80ed20..6208fea7 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerCharTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerCharTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerDoubleTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerDoubleTests.java index d3764f05..69aaebba 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerDoubleTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerDoubleTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerFloatTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerFloatTests.java index 5b1f3c11..07643ab7 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerFloatTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerFloatTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerIntTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerIntTests.java index 4e9e215e..43f63b51 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerIntTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerIntTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerLongTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerLongTests.java index abf8fac9..61cc3f1b 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerLongTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerLongTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerObjectTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerObjectTests.java index 0ece62b6..13c1f9ca 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerObjectTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerObjectTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerShortTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerShortTests.java index a4220e15..3a391ca1 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerShortTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerShortTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test diff --git a/src/test/java/org/cicirello/sequences/SequenceSamplerStringTests.java b/src/test/java/org/cicirello/sequences/SequenceSamplerStringTests.java index ddb54ce3..5795f728 100644 --- a/src/test/java/org/cicirello/sequences/SequenceSamplerStringTests.java +++ b/src/test/java/org/cicirello/sequences/SequenceSamplerStringTests.java @@ -43,7 +43,8 @@ public void testSamplePool() { @Test public void testSampleInsertion() { - validateSamples(SequenceSampler::sampleInsertion); + SequenceInsertionSampler r = new SequenceInsertionSampler(new SplittableRandom(42)); + validateSamples(r::nextSample); } @Test From 54d0cc21d7331a2650f3c203ed6f82dadfa1b210 Mon Sep 17 00:00:00 2001 From: "Vincent A. Cicirello" Date: Fri, 18 Nov 2022 15:02:58 -0500 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a63687b..b9864ccd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * Added the SequenceSampler interface's methods to SequenceReservoirSampler. * Added the SequenceSampler interface's methods to SequencePoolSampler. +* Added the SequenceSampler interface's methods to SequenceInsertionSampler. ### Changed * SequenceSampler converted from a utility class of static methods to an interface, retaining the existing static @@ -21,10 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed * SequenceSampler.sampleReservoir methods, previously deprecated in 4.3.0, replaced by the SequenceReservoirSampler class. * SequenceSampler.samplePool methods, previously deprecated in 4.3.0, replaced by the SequencePoolSampler class. +* SequenceSampler.sampleInsertion methods, previously deprecated in 4.3.0, replaced by the SequenceInsertionSampler class. ### Fixed ### Dependencies +* Bump rho-mu from 2.5.0 to 3.0.1 ### CI/CD