Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Fragment funkcji run:
- for(int i=0; i<log; i++)
- {
- if((int)pow(2,i) > idx)
- {
- try {
- int myfriend = (int) (idx + pow(2,i));
- System.out.println("hello, i'm "+ idx + " and i'm sending data to "+myfriend+" \n");
- if(myfriend <= nNodes - 1)
- {
- mNode.send(myfriend, mData);
- }
- } catch (InterruptedException ex) {
- Logger.getLogger(BasicCommDistributed.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- else
- {System.out.println("hello, i'm "+ idx + " and i didnt send in iteration " + i);}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement