Skip to content
Snippets Groups Projects
Commit 4ac06454 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Use unsigned types for non-negative integers

parent d63cc398
Branches
Tags
No related merge requests found
......@@ -45,7 +45,7 @@ class SampleFunctional : public SmallFunctional<dimension> {
return d(x) * dir;
}
SmallVector minimise(const SmallVector x, int iterations) const {
SmallVector minimise(const SmallVector x, unsigned int iterations) const {
SmallVector descDir = d(x);
descDir *= -1; // The negative gradient
......@@ -80,7 +80,7 @@ class SampleFunctional : public SmallFunctional<dimension> {
double m = l / 2 + r / 2;
SmallVector middle;
for (size_t count = 0; count < iterations; ++count) {
for (unsigned int count = 0; count < iterations; ++count) {
Dune::dverb << "now at m = " << m << std::endl;
Dune::dverb << "Value of J here: " << operator()(x + middle) << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment