code: private double[][] _step(double[][] state, char ch1) {
      double cost;
      _shift(state);
      state[1][0] = state[0][0] + deletionDistance;
      for (int i = 0; i < base.length(); i++) {
        cost = (base.charAt(i) == ch1) ? 0 : replaceDistance;
        state[1][i + 1] = Math.min(state[1][i] + insertionDistance,
            state[0][i] + cost);
        state[1][i + 1] = Math.min(state[1][i + 1],
            state[0][i + 1] + deletionDistance);
      }
      return state;
    }
docs: Step.
  
  @param state the state
  @param ch1 the ch 1
  @return the double[][]