Exemplo n.º 1
0
        public LinkedList <Observation> generateSymbolTrace(TraceFeatures tf)
        {
            throw new NotImplementedException();

            //5 ist Glättungsordnung
            //var data = (smooth) ? tf.smoothFeature(feature, 10) : tf[feature].Data;

            //var O = new LinkedList<Observation>();
            //O.AddLast(new Observation("GestureStart", 0));
            //for (int i = 2; i < data.Length - 2; i++)
            //{
            //    var v1 = data[i - 2];
            //    var v2 = data[i - 1];
            //    var v = data[i];
            //    var v3 = data[i + 1];
            //    var v4 = data[i + 2];
            //    if (v > v1 && v > v2 && v >= v3 && v >= v4) O.AddLast(new Observation("Maximum", tf.Time[i]));
            //    if (v < v1 && v < v2 && v <= v3 && v <= v4) O.AddLast(new Observation("Minimum", tf.Time[i]));
            //}

            //O.AddLast(new Observation("GestureEnd", tf.Time.Last()));
            //return O;

            /*
             * //find extremas
             * var prevV = firstDeriv.First();
             * foreach (var v in firstDeriv.Skip(1))
             * {
             * //special case prevV == 0??
             *
             * if (prevV.Y > 0 && v.Y <= 0)
             * {
             * //maximum
             * O.AddLast(new Observation("Maximum", (int)prevV.X));
             * }
             * else if (prevV.Y < 0 && v.Y >= 0)
             * {
             * //minimum
             * O.AddLast(new Observation("Minimum", (int)prevV.X));
             * }
             * }
             * return O;
             *
             * */
        }
Exemplo n.º 2
0
        public override LinkedList <Observation> generateSymbolTrace(ICollection <Touch> touchs)
        {
            TraceFeatures tf = new TraceFeatures(touchs);

            return(generateSymbolTrace(tf));
        }