diff --git a/bfps/cpp/particles_base.hpp b/bfps/cpp/particles_base.hpp index 52b096ed8d2d3da67d13d00900c3beaa37ee4c4e..d570a9629d95b01746f69508e1111a0cfcd8d293 100644 --- a/bfps/cpp/particles_base.hpp +++ b/bfps/cpp/particles_base.hpp @@ -48,6 +48,11 @@ class single_particle_state single_particle_state<particle_type> &operator=(const single_particle_state &src); single_particle_state<particle_type> &operator=(const double *src); + + inline double operator[](const int i) + { + return this->data[i]; + } }; #endif//PARTICLES_BASE