Commit e6320cd0 authored by Jens Wehner's avatar Jens Wehner

changed iterators slightly

parent d2a9f7a8
Pipeline #94911844 passed with stages
in 474 minutes and 44 seconds
...@@ -23,10 +23,8 @@ namespace votca { ...@@ -23,10 +23,8 @@ namespace votca {
namespace csg { namespace csg {
void BondedStatistics::BeginCG(Topology *top, Topology *) { void BondedStatistics::BeginCG(Topology *top, Topology *) {
InteractionContainer &ic = top->BondedInteractions();
_bonded_values.clear(); _bonded_values.clear();
for (auto &interaction : ic) { for (auto &interaction : top->BondedInteractions()) {
_bonded_values.CreateArray(interaction->getName()); _bonded_values.CreateArray(interaction->getName());
} }
} }
...@@ -37,7 +35,7 @@ void BondedStatistics::EvalConfiguration(Topology *conf, Topology *) { ...@@ -37,7 +35,7 @@ void BondedStatistics::EvalConfiguration(Topology *conf, Topology *) {
InteractionContainer &ic = conf->BondedInteractions(); InteractionContainer &ic = conf->BondedInteractions();
InteractionContainer::iterator ia; InteractionContainer::iterator ia;
DataCollection<double>::container::iterator is; DataCollection<double>::iterator is;
for (ia = ic.begin(), is = _bonded_values.begin(); ia != ic.end(); for (ia = ic.begin(), is = _bonded_values.begin(); ia != ic.end();
++ia, ++is) { ++ia, ++is) {
(*is)->push_back((*ia)->EvaluateVar(*conf)); (*is)->push_back((*ia)->EvaluateVar(*conf));
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <votca/csg/cgobserver.h> #include <votca/csg/cgobserver.h>
#include <votca/tools/datacollection.h> #include <votca/tools/datacollection.h>
namespace TOOLS = votca::tools;
namespace votca { namespace votca {
namespace csg { namespace csg {
/** /**
...@@ -42,10 +40,10 @@ class BondedStatistics : public votca::csg::CGObserver { ...@@ -42,10 +40,10 @@ class BondedStatistics : public votca::csg::CGObserver {
void EvalConfiguration(Topology *conf, void EvalConfiguration(Topology *conf,
Topology *conf_atom = nullptr) override; Topology *conf_atom = nullptr) override;
TOOLS::DataCollection<double> &BondedValues() { return _bonded_values; } tools::DataCollection<double> &BondedValues() { return _bonded_values; }
protected: protected:
TOOLS::DataCollection<double> _bonded_values; tools::DataCollection<double> _bonded_values;
}; };
} // namespace csg } // namespace csg
} // namespace votca } // namespace votca
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment