/// <summary> /// Find unique elements. /// </summary> public static void Uniq <T>(Narray <T> values) { if (values.Length() == 0) { return; } Quicksort(values); int j = 1; for (int i = 1; i < values.Length(); i++) { if (values[i].Equals(values[j - 1])) { continue; } values[j++] = values[i]; } values.Truncate(j); }