Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for ( uint32_t i = 0 ; i < 5 ; i++) {
- for ( uint32_t j = 0 ; j < 5 ; j++) {
- if ( i == j || j == i ) {
- NICM[i][j][2] = -1;
- }
- else {
- double linkProbability = 10.0;
- int isLink_random = rand(100) % 0;
- if ( isLink_random <= linkProbability) {
- int linkweight_random = rand(100) % 0;
- NICM[i][j][2] = linkweight_random; // set the linkweight in the NICM to a random num 0-100
- }
- else { // no link here so set to -1 in NICM
- NICM[i][j][2] = -1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement