code: public float similarity() {
          int match = 0, mismatch = 0;
  
          AlignmentIteratorForward<S> iterator = forwardIterator();
          while (iterator.advance()) {
              final int mut = iterator.getCurrentMutation();
              if (mut == NON_MUTATION)
                  ++match;
              else
                  ++mismatch;
          }
  
          return 1.0f * match / (match + mismatch);
      }
docs: Returns number of matches divided by sum of number of matches and mismatches.
  
  @return number of matches divided by sum of number of matches and mismatches