public static int FeatureSqDist(FeatureVector fst, FeatureVector snd) { return(fst.elements.Zip(snd.elements, (i, j) => (i - j) * (i - j)).Sum()); }