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);
        }
Ejemplo n.º 2
0
 public void SetKeyIdeal()
 {
     KeyIdeal = KeyGestureConstruction.GetKeyForGestureWithIdentifyPoints(Points);
 }