diff --git a/src/app/qt/utility/QtGraphPostprocessor.cpp b/src/app/qt/utility/QtGraphPostprocessor.cpp index 7335777d..325a18a7 100644 --- a/src/app/qt/utility/QtGraphPostprocessor.cpp +++ b/src/app/qt/utility/QtGraphPostprocessor.cpp @@ -18,7 +18,7 @@ void QtGraphPostprocessor::doPostprocessing(std::list>::iterator it = nodes.begin(); - for(it; it != nodes.end(); it++) + for(; it != nodes.end(); it++) { if((*it)->getSize().x < divisor) { @@ -58,7 +58,7 @@ void QtGraphPostprocessor::resolveOutliers(std::list>::iterator it = nodes.begin(); - for(it; it != nodes.end(); it++) + for(; it != nodes.end(); it++) { Vec2i pos = (*it)->getPosition(); Vec2i toCenterOfMass = centerPoint - pos; @@ -69,7 +69,7 @@ void QtGraphPostprocessor::resolveOutliers(std::listgetPosition(); Vec2i toCenterOfMass = centerPoint - pos; @@ -89,7 +89,7 @@ MatrixDynamicBase QtGraphPostprocessor::buildHeatMap(const std::li MatrixDynamicBase heatMap(heatMapWidth, heatMapHeight); std::list>::const_iterator it = nodes.cbegin(); - for(it; it != nodes.end(); it++) + for(; it != nodes.end(); it++) { int left = (*it)->getPosition().x / atomarNodeSize + heatMapWidth/2; int up = (*it)->getPosition().y / atomarNodeSize + heatMapHeight/2; @@ -132,7 +132,7 @@ void QtGraphPostprocessor::resolveOverlap(std::list iterationCount++; std::list>::iterator it = nodes.begin(); - for(it; it != nodes.end(); it++) + for(; it != nodes.end(); it++) { Vec2i nodePos((*it)->getPosition().x / divisor + heatMapWidth/2, (*it)->getPosition().y / divisor + heatMapHeight/2); @@ -255,10 +255,10 @@ bool QtGraphPostprocessor::getHeatmapGradient(Vec2f& outGradient, const MatrixDy float yP1 = heatMap.getValue(x, y+1); float yM1 = heatMap.getValue(x, y-1); - xP1 = std::sqrtf(xP1); - xM1 = std::sqrtf(xM1); - yP1 = std::sqrtf(yP1); - yM1 = std::sqrtf(yM1); + xP1 = std::sqrt(xP1); + xM1 = std::sqrt(xM1); + yP1 = std::sqrt(yP1); + yM1 = std::sqrt(yM1); float xOffset = (xM1 - val) + (val - xP1); float yOffset = (yM1 - val) + (val - yP1); diff --git a/src/lib/utility/math/MatrixDynamicBase.h b/src/lib/utility/math/MatrixDynamicBase.h index ff3ffa8e..b36dd568 100644 --- a/src/lib/utility/math/MatrixDynamicBase.h +++ b/src/lib/utility/math/MatrixDynamicBase.h @@ -2,6 +2,7 @@ #define MATRIX_DYNAMIC_BASE_H #include +#include /** * @brief Matrix of variable size, needed for spectral graph layouting