Ejemplo n.º 1
0
 public void AddWeb(Web web)
 {
     _particle[] tmp = new _particle[_pool.Length + 1];
     _pool.CopyTo(tmp, 0);
     tmp[tmp.Length - 1] = new _particle(web);
     _pool = tmp;
 }
Ejemplo n.º 2
0
 public Swarm(int poolsize, int[] size, double x, double v)
 {
     _poolsize = poolsize;
     _pool     = new _particle[_poolsize];
     XLimit    = x;
     VLimit    = v;
     for (int i = 0; i < _poolsize; i++)
     {
         _pool[i] = new _particle(size, XLimit, VLimit);
     }
 }