Research Article
Protecting Check-In Data Privacy in Blockchain Transactions with Preserving High Trajectory Pattern Utility
Algorithm 3
The generalized location search algorithm.
Input: distance index D-index, query distance R, any location ; | Output: location queue L. | 1. L=; | 2. pos =1, end =lens (D-index []); | 3. While (pos<end) do | 4. mid=(post+end)/2; | 5. if D-index[mid]<then | 6. pos=mid+1; | 7. else if D-index[mid]>R then | 8. end=mid-1; | 9. else | 10. pos=end=mid; | 11. L=D-index [], i∈(1, pos); | 12. Return L. |
|