Research Article
Trajectory Clustering in an Intersection by GDTW
Algorithm 3
(Trace_back_index_pair_list).
| Trace_back_index_pair_list | | Input: iend, jend: end index pair of matched scheme | | K: traceback index matrix | | Return: idx_pair_list: index pair list of matched scheme | (1) | idx_pair_list = [] | (2) | i, j = iend, jend | (3) | while True: | (4) | idx_pair_list.append([i, j]) | (5) | if i = = 0 and j = = 0 | (6) | break | (7) | i, j = K[i, j] | (8) | idx_pair_list.reverse() | (9) | return idx_pair_list |
|