Exemple #1
0
        public void add(AccelSample accelerationData)
        {
            if (_samples.Count == Config.MAX_SAMPLES)
            {
                _samples.RemoveAt(0);
            }

            _samples.Add(accelerationData);
        }
Exemple #2
0
        public long calculateDistanceBetween(Gesture other)
        {
            if (!isValid && other.isValid)
            {
                return(int.MaxValue);
            }

            AccelSample otherAccelerationData = other.samples[0];

            long[] table = buildTable(other.samples.Count);

            long distance = calculateDTWDistance(
                other.samples,
                samples.Count - 1,
                other.samples.Count - 1,
                table);

            distance /= (samples.Count + other.samples.Count);

            return(distance);
        }
Exemple #3
0
 public void addAccelerationData(AccelSample accelerationData)
 {
 }