Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct particle
- {
- int index;
- double x;
- double y;
- vector<int> nn;
- };
- vector<particle> cluster;
- //initiate the "x" and "y" values of the particles
- particle tmp;
- for (int i = 0; i < 10; i++)
- {
- tmp.index = i;
- tmp.x = 1.1*i;
- tmp.y = 2.2*i;
- cluster.push_back(tmp);
- }
- vector<int> nnn;
- for (int i = 0; i < 5; i++)
- {
- bla.push_back(i);
- }
- cluster[0].nn.push_back(bla);
- for (int i = 0; i < 5; i++)
- {
- cluster[0].nn.push_back(j);
- }
Add Comment
Please, Sign In to add comment