Class AtomicIntegerArrayKMerCount

java.lang.Object
kmer.core.array.AtomicIntegerArrayKMerCount
All Implemented Interfaces:
Iterable<byte[]>, KMerCount

public class AtomicIntegerArrayKMerCount extends Object implements KMerCount
A KMerCount implementation that wraps an AtomicIntegerArray.
Author:
Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Constructor Details

    • AtomicIntegerArrayKMerCount

      public AtomicIntegerArrayKMerCount​(int k, AtomicIntegerArray atomicIntegerArray)
      Constructs an AtomicIntegerArrayKmerCount that wraps the given AtomicIntegerArray.
      Parameters:
      k - the length of the k-mers to count
      atomicIntegerArray - the AtomicIntegerArray to wrap
  • Method Details

    • getCount

      public int getCount​(byte[] kMer)
      Description copied from interface: KMerCount
      Gets the number of times the given k-mer appeared in the corresponding chromosome.
      Specified by:
      getCount in interface KMerCount
      Parameters:
      kMer - the k-mer to look for
      Returns:
      the number of times this k-mer was counted
    • iterator

      public Iterator<byte[]> iterator()
      Specified by:
      iterator in interface Iterable<byte[]>