public void add(AccelSample accelerationData) { if (_samples.Count == Config.MAX_SAMPLES) { _samples.RemoveAt(0); } _samples.Add(accelerationData); }
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); }
public void addAccelerationData(AccelSample accelerationData) { }