[GRASS-SVN] r69867 - grass/branches/releasebranch_7_2/raster/r.texture
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 22 07:56:23 PST 2016
Author: mmetz
Date: 2016-11-22 07:56:23 -0800 (Tue, 22 Nov 2016)
New Revision: 69867
Modified:
grass/branches/releasebranch_7_2/raster/r.texture/h_measure.c
Log:
r.texture: fix f2_contrast (backport from trunk r69866)
Modified: grass/branches/releasebranch_7_2/raster/r.texture/h_measure.c
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.texture/h_measure.c 2016-11-22 15:54:27 UTC (rev 69866)
+++ grass/branches/releasebranch_7_2/raster/r.texture/h_measure.c 2016-11-22 15:56:23 UTC (rev 69867)
@@ -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