Advertisement
desdemona

kkk

Mar 9th, 2015
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. Fragment funkcji run:
  2.             for(int i=0; i<log; i++)
  3.             {
  4.                 if((int)pow(2,i) > idx)
  5.                 {
  6.                 try {
  7.                     int myfriend = (int) (idx + pow(2,i));
  8.                     System.out.println("hello, i'm "+ idx + " and i'm sending data to "+myfriend+" \n");
  9.                      if(myfriend <= nNodes - 1)
  10.                      {
  11.                           mNode.send(myfriend, mData);
  12.                      }
  13.                  } catch (InterruptedException ex) {
  14.                      Logger.getLogger(BasicCommDistributed.class.getName()).log(Level.SEVERE, null, ex);
  15.                  }
  16.                 }
  17.                 else
  18.                 {System.out.println("hello, i'm "+ idx + " and i didnt send in iteration " + i);}
  19.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement