Non-Separable Transforms for Clustering Trajectories