Coarsening Nucleobase Count Assignment
Contents
Building On Previous Exercises
Be sure to complete the Half & Half and Ranges exercises first.
Code To Implement
Warning: Invoke NucleobaseUtils.countRange where appropriate. |
CoarseningNucleobaseCounter
class: | CoarseningNucleobaseCounter.java | |
methods: | constructor numRanges count |
|
package: | count.exercise | |
source folder: | student/src/main/java |
constructor
method: public CoarseningNucleobaseCounter(int numRanges)
(sequential implementation only)
To support the required count method below, we will need to hang onto the number of ranges as an instance variable.
numRanges
method: public int numRanges()
(sequential implementation only)
Getter method for numRanges.
count
method: public int count(byte[] chromosome, Nucleobase targetNucleobase)
(parallel implementation required)
To coarsen our parallel counting of an array of nucleobases, we must use our previously created Ranges slice method and count each Range in parallel.
In the computation graph below, we depict a chromosome of length 42 sliced into 4 Ranges:
There are many incantations of the join_fork_loop to choose from. Be sure to select the correct one.
Correctness
class: | _CoarseningNucleobaseCounterTestSuite.java | |
package: | count.exercise | |
source folder: | testing/src/test/java |
Pledge, Acknowledgments, Citations
file: | nucleobase-count-coarsen-pledge-acknowledgments-citations.txt |
More info about the Honor Pledge