public int WhatIsItWithIdealKey() { if (points.Count == 0) { return(-1); } double minDist = Int32.MaxValue; int index = -1; var temp = new IdentifyCharacteristicsPoints(points, count); var newListPoints = temp.GetIdentifyCharacteristicsPoints(); var keyIdealGesture = KeyGestureConstruction.GetKeyForGestureWithIdentifyPoints(newListPoints); for (int i = 0; i < PGC.IdealGestures.Count; i++) { var tempDist = Distance.LevenshteinDistance(PGC.IdealGestures[i].KeyIdeal, keyIdealGesture); if (minDist > tempDist) { index = i; minDist = tempDist; } } return(index); }
public void SetKeyIdeal() { KeyIdeal = KeyGestureConstruction.GetKeyForGestureWithIdentifyPoints(Points); }