  Detecting commuting patterns or migration patterns in movement data is an
important problem in computational movement analysis. Given a trajectory, or
set of trajectories, this corresponds to clustering similar subtrajectories.
  We study subtrajectory clustering under the continuous and discrete Fr\'echet
distances. The most relevant theoretical result is by Buchin et al. (2011).
They provide, in the continuous case, an $O(n^5)$ time algorithm and a
3SUM-hardness lower bound, and in the discrete case, an $O(n^3)$ time
algorithm. We show, in the continuous case, an $O(n^3 \log^2 n)$ time algorithm
and a 3OV-hardness lower bound, and in the discrete case, an $O(n^2 \log n)$
time algorithm and a quadratic lower bound. Our bounds are almost tight unless
SETH fails.
