#include <particles.h>

template<class C> Particles<C>::Particles()
{
}
template<class C> Particles<C>::Particles(int number)
{
  p.resize(number);
  this->number = number;
}
template<class C> Particles<C>::Particles(int number, int dimension)
{
  resize(number, dimension);
}
template<class C> Particles<C>::~Particles()
{
}
template<class C> bool Particles<C>::resize(int number, int dimension)
{
  p.resize(number);
  this->number = number;
  typedef Particle<C> ParticleC;
//  for(vector<ParticleC>::iterator i= p.begin();
//    i!=p.end();++i)
  for(unsigned int i=0;i<p.size();++i)
  {
//    i->resize(dimension);
    p[i].resize(dimension);
  }
  return(true);
}
template<class C> int Particles<C>::size()
{
  return(number);
}
template<class C> Particle<C> &Particles<C>::operator[](unsigned int i)
{
  return(p.at(i));
}
template<class C> Particle<C> Particles<C>::operator[](unsigned int i) const
{
  return(p.at(i));
}
template<class C> vector<Particle<C> > Particles<C>::get_particles()
{
  return(p);
}
template<class C> int Particles<C>::dump_particles()
{
//  for(vector<Particle<C> >::iterator i=p.begin();
//      i!=p.end();++i)
  for(unsigned int i=0;i<p.size();++i)
  {
//    i->dump();
    p[i].dump();
  }
  return(0);
}
template<class C> string Particles<C>::toString()
{
  ostringstream s;
  for(unsigned int i=0;i<p.size();++i)
  {
    s<<p[i].toString();
  }
  return(s.str());
}

template class Particles<int>;
template class Particles<double>;
