/** {@inheritDoc} */
  @Override
  public void initialize(final int readMaxLength, final int haplotypeMaxLength) {
    super.initialize(readMaxLength, haplotypeMaxLength);

    transition = PairHMMModel.createTransitionMatrix(maxReadLength);
    prior = new double[paddedMaxReadLength][paddedMaxHaplotypeLength];

    // Initialize all arrays
    // Final Cell of array is a padding cell, initialized to zero.
    currentMatchArray = new double[paddedMaxReadLength];
    currentDeleteArray = new double[paddedMaxReadLength];
    currentInsertArray = new double[paddedMaxReadLength];

    parentMatchArray = new double[paddedMaxReadLength];
    parentDeleteArray = new double[paddedMaxReadLength];
    parentInsertArray = new double[paddedMaxReadLength];

    grandparentMatchArray = new double[paddedMaxReadLength];
    grandparentDeleteArray = new double[paddedMaxReadLength];
    grandparentInsertArray = new double[paddedMaxReadLength];

    // Initialize the special arrays used for caching when successive haplotypes have a common
    // prefix
    matchCacheArray = new double[paddedMaxReadLength];
    deleteCacheArray = new double[paddedMaxReadLength];
    insertCacheArray = new double[paddedMaxReadLength];

    nextMatchCacheArray = new double[paddedMaxReadLength];
    nextDeleteCacheArray = new double[paddedMaxReadLength];
    nextInsertCacheArray = new double[paddedMaxReadLength];
  }
 /**
  * Initializes the matrix that holds all the constants related to quality scores.
  *
  * @param insertionGOP insertion quality scores of the read
  * @param deletionGOP deletion quality scores of the read
  * @param overallGCP overall gap continuation penalty
  */
 @Requires({"insertionGOP != null", "deletionGOP != null", "overallGCP != null"})
 @Ensures("constantsAreInitialized")
 protected static void initializeProbabilities(
     final double[][] transition,
     final byte[] insertionGOP,
     final byte[] deletionGOP,
     final byte[] overallGCP) {
   PairHMMModel.qualToTransProbs(transition, insertionGOP, deletionGOP, overallGCP);
 }