Research Article
Exploiting Temporal and Spatial Regularities for Content Dissemination in Opportunistic Social Network
Algorithm 2
Choice of the best ambassador.
Input: Source node S, GPS traces of nodes, number of nodes in a community n, number of places in a map m | Output: The best ambassador | (1) Initiation: set variables as zero | (2) Begin | (3) for (i=0, i <n, i++) | (4)for (j=0, j <m, j++) | (5) | (6)calculate the mobility areas using GPS traces for node | (7)if is in the place | (8) | (9) | (10)add into mobility trajectory for | (11) | (12) | (13)for (i=0, i <n, i++) | (14) | (15)for (j=0, j <m, j++) | (16) | (17) | (18) | (19)if | (20)node is an ambassador node | (21) | (22)for (i=0, i < ambass_array.length, i++) | (23) | (24)temp_array.add(traceSimilarityComparison(S, ambass_array )) | (25) | (26) Return max_value(temp_array) | (27) End |
|