Guest User

Untitled

a guest
Jan 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. struct particle
  2. {
  3. int index;
  4. double x;
  5. double y;
  6. vector<int> nn;
  7. };
  8.  
  9. vector<particle> cluster;
  10. //initiate the "x" and "y" values of the particles
  11. particle tmp;
  12. for (int i = 0; i < 10; i++)
  13. {
  14. tmp.index = i;
  15. tmp.x = 1.1*i;
  16. tmp.y = 2.2*i;
  17. cluster.push_back(tmp);
  18. }
  19.  
  20. vector<int> nnn;
  21. for (int i = 0; i < 5; i++)
  22. {
  23. bla.push_back(i);
  24. }
  25. cluster[0].nn.push_back(bla);
  26.  
  27. for (int i = 0; i < 5; i++)
  28. {
  29. cluster[0].nn.push_back(j);
  30. }
Add Comment
Please, Sign In to add comment