Class IntArrayKMerCount

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

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

    Constructors 
    Constructor Description
    IntArrayKMerCount​(int k, int[] array)
    Constructs an IntArrayKMerCount that wrap the given int array.
  • 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

    • IntArrayKMerCount

      public IntArrayKMerCount​(int k, int[] array)
      Constructs an IntArrayKMerCount that wrap the given int array.
      Parameters:
      k - the length of the k-mers to count
      array - the array 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[]>