Skip to main content
. Author manuscript; available in PMC: 2013 Sep 20.
Published in final edited form as: IEEE Trans Inf Technol Biomed. 2012 Jan 27;16(3):413–423. doi: 10.1109/TITB.2012.2185850

Algorithm 4.

formCluster(W, n)

Require: Original dataset D, trajectory W, integer n specifying the
  number of trajectories to be included in the cluster
Return: Cluster C, ILM(C) and ALM(C)
1: D ← D \ {W}; W; i′ ← 0; a′ ← 0
2: for all j ∈ [1, (n − 1)] do
3:   Z ← argminTD {(i + a)|i, a ∈ A-GS(W̃, i′, a′, T)}
  ▷Align with Z, the closest trajectory to
4:   {T̃, i, a} ← A-GS(W̃, i′, a′, Z)
5:   D ← D \ {Z}; T; i′i; a′a
6: end for
▷Form a cluster of anonymized trajectories
7: C ← the set containing n copies of
8: return {C, i′, a′}