Research Article
A Probabilistic Spray-and-Wait Routing Algorithm Based on Node Interest Preference in Delay Tolerant Networks
Algorithm 3
Pseudocode for NIP-PSW’s Wait phase.
Input: | , set of nodes in the network | , the threshold of node interest similarity () | , set of messages carried by | , set of messages carried by | 1: if encounters then | 2: , update and | 3: delete messages in and according to their own | 4: for each message in do | 5: | 6: ifthen | 7: directly forwards to | 8: end if | 9: if | 10: add to | 11: end if | 12: end for | 13: end if |
|