Important: Use custom search function to get better results from our thousands of pages

Use " " for compulsory search eg:"electronics seminar" , use -" " for filter something eg: "electronics seminar" -"/tag/" (used for exclude results from tag pages)


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ns2 code trust value calculation
#1

Hi am mohini i would like to get details on ns2 code trust value calculation ..My friend mohana said ns2 code trust value calculation will be available here
Reply
#2
//Finding common neighbor for current path

int common_count=0;

int common_neighbor[100];

for (int p=0;p<neighbor_count[index];p++) {

for (int q=0;q<neighbor_count[path->nexthop];q++) {

//printf("n1=%d n2=%d\n",neighbor_id[index][p],neighbor_id[rt->rt_nexthop][q]);

if(neighbor_id[index][p]==neighbor_id[path->nexthop][q]) {

common_neighbor[common_count]=neighbor_id[index][p];

//printf("neighborid=%d\n",common_neighbor[common_count]);

if(malicious_status[neighbor_id[index][p]]==1) {

printf("Attacker %d is common neighbor \n",neighbor_id[index][p]);

}

common_count=common_count+1;

}

}

}

printf("Current_Path path->nexthop=%d \t common_count %d\n",path->nexthop,common_count);

float a[common_count];

float g_trust=0.0;

float avg_trust;

float add_trust;

for (int r=0;r<common_count;r++) { a[r]=DT[common_neighbor[r]][path->nexthop];

printf("DT=%.2f for nexthop %d at node %d\n",a[r],path->nexthop,common_neighbor[r]);

g_trust = g_trust + a[r];

}

avg_trust = g_trust / common_count;

avg_trust is the average trust value of indirect neighbors.
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  code for go back n arq in opengl Guest 0 121 07-05-2019, 02:24 PM
Last Post: Guest
  source code for aquarium in computer graphics using opengl Guest 3 3,776 07-04-2019, 04:23 PM
Last Post: Guest
  msf desalination matlab code Guest 0 43 08-10-2018, 05:01 PM
Last Post: Guest
  verilog code to implement nikhilam sutra Guest 2 45 25-09-2018, 08:00 PM
Last Post: Guest
  automatic timetable generator for collage source code in php Guest 0 41 10-09-2018, 09:57 AM
Last Post: Guest
  matlab code for iris recognition using wavelets Guest 0 38 11-05-2018, 07:49 AM
Last Post: Guest
  leaky bucket source code in opengl Guest 0 34 02-05-2018, 05:58 PM
Last Post: Guest
  opengl code for leaky bucket Guest 0 38 02-05-2018, 06:43 AM
Last Post: Guest
  leaky bucket source code in opengl Guest 0 38 24-04-2018, 08:13 PM
Last Post: Guest
  opengl code for leaky bucket Guest 0 11 19-02-2018, 05:23 PM
Last Post: Guest
This Page May Contain What is ns2 code trust value calculation And Latest Information/News About ns2 code trust value calculation,If Not ...Use Search to get more info about ns2 code trust value calculation Or Ask Here

Options: