Skip to main content
. 2024 Mar 9;24(6):1775. doi: 10.3390/s24061775
Algorithm 1: Computing Direct Trust
input: Trust values of Te, Tu, Th, Tdh
output: Direct Trust NTd
      if Target node is an immediate neighbor node then
          if Trust value does not exist for Target node then
                 NTd=Te+Tu+ThTdhNTDnodeid=NTDnodeid+NTd
          else
                  NTd=Te+Tu+ThTdh
                 NTDnodeid=NTDnodeid+NTdCounternodeid=Counternodeid+1forgettingCurve(NTD,Counter,nodeid)
          end if
     end if