[GRASS-SVN] r69868 - grass/branches/releasebranch_7_0/raster/r.texture
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 22 07:56:49 PST 2016
Author: mmetz
Date: 2016-11-22 07:56:49 -0800 (Tue, 22 Nov 2016)
New Revision: 69868
Modified:
grass/branches/releasebranch_7_0/raster/r.texture/h_measure.c
Log:
r.texture: fix f2_contrast (backport from trunk r69866)
Modified: grass/branches/releasebranch_7_0/raster/r.texture/h_measure.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.texture/h_measure.c 2016-11-22 15:56:23 UTC (rev 69867)
+++ grass/branches/releasebranch_7_0/raster/r.texture/h_measure.c 2016-11-22 15:56:49 UTC (rev 69868)
@@ -427,10 +427,8 @@
/* two-loop version */
for (i = 0; i < Ng; i++) {
- for (j = 0; j < Ng; j++) {
- if (i != j) {
- sum += P[i][j] * (tone[i] - tone[j]) * (tone[i] - tone[j]);
- }
+ for (j = 0; j < i; j++) {
+ bigsum += 2 * P[i][j] * (tone[i] - tone[j]) * (tone[i] - tone[j]);
}
}
More information about the grass-commit
mailing list