Algorithm 2. The CWC computing algorithm.
| Input: a binary mobility intention sequence X, the true periodicity T0 |
| Output: the CWC’s value of the binary mobility intention sequence X. |
| 1: , |
| 2: compute as Eq. (6) |
| 3: Sort by descending |
| 4: while do |
| 5: compute icp as Eq. (16) |
| 6: compute niw as Eq. (18) |
| 7: compute cwc as Eq. (17) |
| 8: if then |
| 9: |
| 10: end if |
| 11: end while |
| 12: return CWCout |