Balanced String Map K Mer Counting Assignment
Contents
Individual Assignment
This is an individual assignment.
Previous Assignment
Be sure to complete the unbalanced String Map K-mer Counting group warmup first.
Code to Implement
StringConcurrentMapBalancedKMerCounter
class: | StringConcurrentMapBalancedKMerCounter.java | |
methods: | constructor balancer concurrentMapFactory createConcurrentMap parse |
|
package: | kmer.warmup | |
source folder: | student/src/main/java |
Note: this class forces a somewhat ridiculous amount of abstraction when it comes to constructing new ConcurrentMaps. The constructor will be passed a KMerBalancer and Supplier to be used instead of, for example, constructing a DefaultKMerBalancer and ConcurrentHashMaps directly. This allows the testing to catch errors sooner in an effort to aid debugging.
constructor and instance variable
Hang onto the balancer passed to the constructor in an instance variable so you can use them later.
public StringConcurrentMapBalancedKMerCounter(KMerBalancer balancer)
balancer
Return the balancer passed to the constructor.
parse
method: public StringMapKMerResults parse(List<byte[]> sequences, int k)
(parallel implementation required)
This implementation will make your StringConcurrentMapUnbalancedKMerCounter implementation into a balanced one.
Testing Your Solution
class: | _StringConcurrentMapBalancedKMerTestSuite.java | |
package: | kmer.warmup | |
source folder: | testing/src/test/java |