Commit a825d222 authored by Christoph Junghans's avatar Christoph Junghans Committed by GitHub

Merge pull request #442 from votca/tools_correlate_rewrite

changed iterators slightly
parents 7107f4e3 e06a89a9
Pipeline #94951878 passed with stages
in 473 minutes and 10 seconds
......@@ -23,10 +23,8 @@ namespace votca {
namespace csg {
void BondedStatistics::BeginCG(Topology *top, Topology *) {
InteractionContainer &ic = top->BondedInteractions();
_bonded_values.clear();
for (auto &interaction : ic) {
for (auto &interaction : top->BondedInteractions()) {
_bonded_values.CreateArray(interaction->getName());
}
}
......@@ -37,7 +35,7 @@ void BondedStatistics::EvalConfiguration(Topology *conf, Topology *) {
InteractionContainer &ic = conf->BondedInteractions();
InteractionContainer::iterator ia;
DataCollection<double>::container::iterator is;
DataCollection<double>::iterator is;
for (ia = ic.begin(), is = _bonded_values.begin(); ia != ic.end();
++ia, ++is) {
(*is)->push_back((*ia)->EvaluateVar(*conf));
......
......@@ -21,8 +21,6 @@
#include <votca/csg/cgobserver.h>
#include <votca/tools/datacollection.h>
namespace TOOLS = votca::tools;
namespace votca {
namespace csg {
/**
......@@ -42,10 +40,10 @@ class BondedStatistics : public votca::csg::CGObserver {
void EvalConfiguration(Topology *conf,
Topology *conf_atom = nullptr) override;
TOOLS::DataCollection<double> &BondedValues() { return _bonded_values; }
tools::DataCollection<double> &BondedValues() { return _bonded_values; }
protected:
TOOLS::DataCollection<double> _bonded_values;
tools::DataCollection<double> _bonded_values;
};
} // namespace csg
} // 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