Calculating neighborhood areas for subpattern matches.