|
|
@ -72,16 +72,16 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(n > 100) { |
|
|
|
const double average = cumulative / (double)n; |
|
|
|
power[i] = -2.5/log(average/(double)max_int[i]); |
|
|
|
if(power[i] < 0) |
|
|
|
power[i] = 1; |
|
|
|
} else { |
|
|
|
|
|
|
|
const double average = cumulative / (double)(width*height); |
|
|
|
power[i] = -2.5/log(average/(double)max_int[i]); |
|
|
|
if(power[i] < 0) { |
|
|
|
power[i] = 1; |
|
|
|
LogInfo("negative power\n"); |
|
|
|
} |
|
|
|
|
|
|
|
if(n <= width) { |
|
|
|
|
|
|
|
if(n < width) { |
|
|
|
LogInfo("not enough data\n"); |
|
|
|
return; |
|
|
|
} |
|
|
|