From 8453d12b21b4725977ee1a920aa88451fbf9948f Mon Sep 17 00:00:00 2001 From: Cristian C Lalescu <Cristian.Lalescu@ds.mpg.de> Date: Sat, 13 Feb 2016 13:16:03 +0100 Subject: [PATCH] add operator[] for particle_state --- bfps/cpp/particles_base.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bfps/cpp/particles_base.hpp b/bfps/cpp/particles_base.hpp index 52b096ed..d570a962 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 -- GitLab