Class AtomicIntegerArrayKMerCount

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

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

    Constructors 
    Constructor Description
    AtomicIntegerArrayKMerCount​(int k, java.util.concurrent.atomic.AtomicIntegerArray atomicIntegerArray)
    Constructs an AtomicIntegerArrayKmerCount that wraps the given AtomicIntegerArray.
  • Method Summary

    Modifier and Type Method Description
    int getCount​(byte[] kMer)
    Gets the number of times the given k-mer appeared in the corresponding chromosome.
    java.util.Iterator<byte[]> iterator()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • AtomicIntegerArrayKMerCount

      public AtomicIntegerArrayKMerCount​(int k, java.util.concurrent.atomic.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 java.util.Iterator<byte[]> iterator()
      Specified by:
      iterator in interface java.lang.Iterable<byte[]>