Skip to content
Snippets Groups Projects
Commit aeb6c4e0 authored by Ben Webb's avatar Ben Webb
Browse files

Use C++11 features

IMP now requires C++11, so we can now use the
'override' keyword and range-based for loops.
parent 8cbbde4d
No related branches found
No related tags found
No related merge requests found
...@@ -134,16 +134,15 @@ class IMPBAYESIANEMEXPORT GaussianEMRestraint : public Restraint ...@@ -134,16 +134,15 @@ class IMPBAYESIANEMEXPORT GaussianEMRestraint : public Restraint
Float get_slope(){return slope_;} Float get_slope(){return slope_;}
virtual double virtual double
unprotected_evaluate(IMP::DerivativeAccumulator *accum) unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override;
const IMP_OVERRIDE; virtual IMP::ModelObjectsTemp do_get_inputs() const override;
virtual IMP::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
void show(std::ostream &out) const { out << "GEM restraint"; } void show(std::ostream &out) const { out << "GEM restraint"; }
//! \return Information for writing to RMF files //! \return Information for writing to RMF files
RestraintInfo *get_static_info() const IMP_OVERRIDE; RestraintInfo *get_static_info() const override;
//! \return Information for writing to RMF files //! \return Information for writing to RMF files
RestraintInfo *get_dynamic_info() const IMP_OVERRIDE; RestraintInfo *get_dynamic_info() const override;
IMP_OBJECT_METHODS(GaussianEMRestraint); IMP_OBJECT_METHODS(GaussianEMRestraint);
......
...@@ -203,7 +203,7 @@ IMP::em::DensityMap *get_masked_map(const IMP::algebra::Gaussian3Ds &gmm, ...@@ -203,7 +203,7 @@ IMP::em::DensityMap *get_masked_map(const IMP::algebra::Gaussian3Ds &gmm,
double threshold) { double threshold) {
DensityGrid mask = IMP::bayesianem::get_grid(densitymap); DensityGrid mask = IMP::bayesianem::get_grid(densitymap);
IMP_FOREACH(const DensityGrid::Index & i, mask.get_all_indexes()) { for (const DensityGrid::Index & i : mask.get_all_indexes()) {
mask[i] = 0.0; mask[i] = 0.0;
} }
...@@ -274,7 +274,7 @@ double get_overlap_fast(const IMP::algebra::Gaussian3Ds &gmm, ...@@ -274,7 +274,7 @@ double get_overlap_fast(const IMP::algebra::Gaussian3Ds &gmm,
/* /*
double m1(0.0); double m1(0.0);
double m2(0.0); double m2(0.0);
IMP_FOREACH(const IMP::algebra::DensityGrid::Index & i, for (const IMP::algebra::DensityGrid::Index & i :
orig.get_all_indexes()) { orig.get_all_indexes()) {
IMP::algebra::Vector3D position(orig.get_center(i)); IMP::algebra::Vector3D position(orig.get_center(i));
IMP::algebra::DensityGrid::Index IMP::algebra::DensityGrid::Index
...@@ -286,8 +286,7 @@ double get_overlap_fast(const IMP::algebra::Gaussian3Ds &gmm, ...@@ -286,8 +286,7 @@ double get_overlap_fast(const IMP::algebra::Gaussian3Ds &gmm,
*/ */
double score(0.0); double score(0.0);
int norm(0); int norm(0);
IMP_FOREACH(const DensityGrid::Index & i, for (const DensityGrid::Index & i : orig.get_all_indexes()) {
orig.get_all_indexes()) {
IMP::algebra::Vector3D position(orig.get_center(i)); IMP::algebra::Vector3D position(orig.get_center(i));
DensityGrid::Index j(rasterized.get_nearest_index(position)); DensityGrid::Index j(rasterized.get_nearest_index(position));
// rasterized[j]*=scale; // rasterized[j]*=scale;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment