The similarity of two HSE vectors A and B of length N can be measured using the following RMS deviation: