Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1.     for ( uint32_t i = 0 ; i < 5 ; i++) {
  2.         for ( uint32_t j = 0 ; j < 5 ; j++) {
  3.             if ( i == j || j == i ) {
  4.                 NICM[i][j][2] = -1;
  5.             }
  6.             else {
  7.                 double linkProbability = 10.0;
  8.                 int isLink_random = rand(100) % 0;
  9.  
  10.                 if ( isLink_random <= linkProbability) {
  11.                     int linkweight_random = rand(100) % 0;
  12.                     NICM[i][j][2] = linkweight_random; // set the linkweight in the NICM to a random num 0-100
  13.                 }
  14.                 else {  // no link here so set to -1 in NICM
  15.                     NICM[i][j][2] = -1;
  16.                 }
  17.             }
  18.  
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement