Commit 10368787 authored by Dmitry-Me's avatar Dmitry-Me

Reduce variable scope

parent fdf31ec1
...@@ -136,7 +136,6 @@ namespace cv ...@@ -136,7 +136,6 @@ namespace cv
dprintf(("d first time\n"));print_matrix(d); dprintf(("d first time\n"));print_matrix(d);
dprintf(("r\n"));print_matrix(r); dprintf(("r\n"));print_matrix(r);
double beta=0;
for(int count=0;count<_termcrit.maxCount;count++){ for(int count=0;count<_termcrit.maxCount;count++){
minimizeOnTheLine(_Function,proxy_x,d,minimizeOnTheLine_buf1,minimizeOnTheLine_buf2); minimizeOnTheLine(_Function,proxy_x,d,minimizeOnTheLine_buf1,minimizeOnTheLine_buf2);
r.copyTo(r_old); r.copyTo(r_old);
...@@ -147,7 +146,7 @@ namespace cv ...@@ -147,7 +146,7 @@ namespace cv
break; break;
} }
r_norm_sq=r_norm_sq*r_norm_sq; r_norm_sq=r_norm_sq*r_norm_sq;
beta=MAX(0.0,(r_norm_sq-r.dot(r_old))/r_norm_sq); double beta=MAX(0.0,(r_norm_sq-r.dot(r_old))/r_norm_sq);
d=r+beta*d; d=r+beta*d;
} }
......
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