[GRASS-SVN] r61210 - in grass-addons/grass7/raster: r.fuzzy.logic r.fuzzy.set r.fuzzy.system
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 9 02:48:15 PDT 2014
Author: hellik
Date: 2014-07-09 02:48:15 -0700 (Wed, 09 Jul 2014)
New Revision: 61210
Modified:
grass-addons/grass7/raster/r.fuzzy.logic/main.c
grass-addons/grass7/raster/r.fuzzy.logic/r.fuzzy.logic.html
grass-addons/grass7/raster/r.fuzzy.set/main.c
grass-addons/grass7/raster/r.fuzzy.set/r.fuzzy.set.html
grass-addons/grass7/raster/r.fuzzy.system/helpers.c
grass-addons/grass7/raster/r.fuzzy.system/main.c
grass-addons/grass7/raster/r.fuzzy.system/r.fuzzy.system.html
grass-addons/grass7/raster/r.fuzzy.system/rule_parser.c
grass-addons/grass7/raster/r.fuzzy.system/system.c
Log:
r.fuzzy.*: fix typos
Modified: grass-addons/grass7/raster/r.fuzzy.logic/main.c
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.logic/main.c 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.logic/main.c 2014-07-09 09:48:15 UTC (rev 61210)
@@ -113,7 +113,7 @@
family = HAMACHER;
if (operator == _NOT && inputy)
- G_warning("Negation is unary operaton ymap is ignored");
+ G_warning("Negation is unary operation ymap is ignored");
if (operator != _NOT && !inputy)
G_fatal_error("For binary operation (AND, OR, IMP) ymap is required");
Modified: grass-addons/grass7/raster/r.fuzzy.logic/r.fuzzy.logic.html
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.logic/r.fuzzy.logic.html 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.logic/r.fuzzy.logic.html 2014-07-09 09:48:15 UTC (rev 61210)
@@ -13,20 +13,20 @@
</dd>
<dt><b>operator</b></dt>
<dd>A fuzzy set operators are generalization of crisp operators. There is more
-than one possible generalization of every opeartor. There are three operations:
-fuzzy complements, fuzzy intersections, and fuzzy unions. Addational implication
+than one possible generalization of every operator. There are three operations:
+fuzzy complements, fuzzy intersections, and fuzzy unions. Additional implication
operator is also provided.
<ul>
<li>fuzzy intersection (<b>AND</b>) use T-norm of given family for calculation;
<li>fuzzy union (<b>OR</b>) use T-conorm of given family for calculation;
-<li>fuzzy complement (<b>NOT</b>) fuzzy negation ussualy 1-x;
+<li>fuzzy complement (<b>NOT</b>) fuzzy negation usually 1-x;
<li>fuzzy implication (<b>IMP</b>) use residuum of given family if available;
</ul>
</dd>
<dt><b>family</b></dt>
<dd>T-norms, T-conorms and residuals are a generalization of the two-valued
logical conjunction, disjunction and implication used by boolean logic, for
-fuzzy logics. Because there is more than one possible generalisation of logial
+fuzzy logics. Because there is more than one possible generalisation of logical
operations, r.fuzzy.logic provides 6 most popular families for fuzzy operations:
<ul>
<li><b>Zadeh</b> with minimum (Godel) t-norm and maximum T-conorm;
@@ -47,7 +47,7 @@
<dl>
<dt><b>output</b></dt>
<dd>Map containing result of two-values operations. Multivalued operations will
-be avaialbel in the future. Map is always of type FCELLS and contains values
+be available in the future. Map is always of type FCELLS and contains values
from 0 (no membership) to 1 (full membership). Values between 0 and 1 indicate
partial membership</dd>
</dl>
Modified: grass-addons/grass7/raster/r.fuzzy.set/main.c
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.set/main.c 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.set/main.c 2014-07-09 09:48:15 UTC (rev 61210)
@@ -133,7 +133,7 @@
height = atof(par_height->answer);
if (height > 1 || height < 0)
- G_fatal_error(_("Heght modifier must be between 0 and 1 but is %f"),
+ G_fatal_error(_("Height modifier must be between 0 and 1 but is %f"),
height);
num_points = sscanf(par_points->answer,
@@ -195,7 +195,7 @@
else {
if (0 > (tmp = fuzzy((FCELL) c)))
G_warning
- ("Cannot determine memebership at row %d, col %d",
+ ("Cannot determine membership at row %d, col %d",
row, col);
((FCELL *) out_buf)[col] = tmp;
}
@@ -209,7 +209,7 @@
tmp = fuzzy((FCELL) f);
if (0 > (tmp = fuzzy((FCELL) f)))
G_warning
- ("Cannot determine memebership at row %d, col %d",
+ ("Cannot determine membership at row %d, col %d",
row, col);
((FCELL *) out_buf)[col] = tmp;
}
@@ -222,7 +222,7 @@
else {
if (0 > (tmp = fuzzy((FCELL) d)))
G_warning
- ("Cannot determine memebership at row %d, col %d",
+ ("Cannot determine membership at row %d, col %d",
row, col);
((FCELL *) out_buf)[col] = tmp;
}
Modified: grass-addons/grass7/raster/r.fuzzy.set/r.fuzzy.set.html
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.set/r.fuzzy.set.html 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.set/r.fuzzy.set.html 2014-07-09 09:48:15 UTC (rev 61210)
@@ -1,7 +1,7 @@
<h2>OPTIONS</h2>
<dl>
<dt><b>input</b></dt>
-<dd>Name of input raster map to be fuzified. This map may be of any type and may
+<dd>Name of input raster map to be fuzzified. This map may be of any type and may
require null values.
</dd>
<dt><b>points</b></dt>
@@ -35,13 +35,13 @@
<h2>FUZZY SET PARAMETERS</h2>
<dl>
<dt><b>boundary</b></dt>
-<dd>Parameter definied the shape of the fuzzy boundary. The default and most
+<dd>Parameter defined the shape of the fuzzy boundary. The default and most
popular is S-shaped, linear, J-shaped and G-shaped boundaries are also
-available. The same boundaires are appled to the both sides.</dd>
+available. The same boundaries are applied to the both sides.</dd>
<dt><b>shape</b></dt>
<dd>Optional shape modifier. Range from -1 to 1. The default value is 0 and
-shoud not be changed in most of the time. The negative values indicate more
+should not be changed in most of the time. The negative values indicate more
dilatant set, the positive values more concentrate set. See description for
details.
<center>
@@ -51,8 +51,8 @@
</dd>
<dt><b>height</b></dt>
<dd>Optional height modifier. Range from 0 to 1. The default value is 1 and
-indicate full membership beteen points B and C. If height is lesser than one the
-maximum memebrship is equal to height. See image: Fuzzy set definition.</dd>
+indicate full membership between points B and C. If height is lesser than one the
+maximum membership is equal to height. See image: Fuzzy set definition.</dd>
</dl>
<h2>DESCRIPTION</h2>
@@ -90,7 +90,7 @@
<b>S-shaped:</b> it use following equation:
<pre><code>
sin(x * Pi/2)^m (for positive shape parameter)
-1-cos(x * Pi/2)^m (for nagative shape parameter)
+1-cos(x * Pi/2)^m (for negative shape parameter)
where x: membership, and
m = 2^exp(2,shape) (for positive shape parameter)
@@ -98,7 +98,7 @@
where m: shape parameter.
</code></pre>
-For default shape parameter = 0 m is = 2 whcich is most common parameter for
+For default shape parameter = 0 m is = 2 which is most common parameter for
that equation.
<p>
Modified: grass-addons/grass7/raster/r.fuzzy.system/helpers.c
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.system/helpers.c 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.system/helpers.c 2014-07-09 09:48:15 UTC (rev 61210)
@@ -30,7 +30,7 @@
int char_strip(char *buf, char rem)
-/* remove spaces, tabs and one addational character */
+/* remove spaces, tabs and one additional character */
{
register char *a, *b;
Modified: grass-addons/grass7/raster/r.fuzzy.system/main.c
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.system/main.c 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.system/main.c 2014-07-09 09:48:15 UTC (rev 61210)
@@ -111,7 +111,7 @@
par_resolution->description = _("Universe resolution");
par_resolution->guisection = _("Advanced options");
- in_coor_opt = G_define_option(); /* input coordinates de outlet */
+ in_coor_opt = G_define_option(); /* input coordinates */
in_coor_opt->key = "coors";
in_coor_opt->type = TYPE_STRING;
in_coor_opt->key_desc = "x,y";
@@ -130,7 +130,7 @@
out_multiple = G_define_flag();
out_multiple->key = 'm';
out_multiple->description =
- _("Create addational fuzzy output maps for every rule");
+ _("Create additional fuzzy output maps for every rule");
opt_output = G_define_standard_option(G_OPT_R_OUTPUT);
Modified: grass-addons/grass7/raster/r.fuzzy.system/r.fuzzy.system.html
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.system/r.fuzzy.system.html 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.system/r.fuzzy.system.html 2014-07-09 09:48:15 UTC (rev 61210)
@@ -9,7 +9,7 @@
output map is marked by special name <b>_OUTPUT_</b> If maps are in different
mapsets the name require @. Map names in database cannot contain following
symbols: <b> %,$ and #</b>. Every map name must start with map name
-identifier:<b> %</b>. Every set definition connected with cetrain map must
+identifier:<b> %</b>. Every set definition connected with certain map must
follow the map name and must start with set identifier :<b> $</b>. The set
definition must be in braces { } and requires parameters separated by semicolon.
Any whitespaces like spaces, tabs, empty lines are allowed and may used to
@@ -22,23 +22,23 @@
<li><b>side</b>: Option indicate if set is fuzzified of both sides (both), left
or right side. Available: <i>both, left, right</i>.
<li><b>points</b>: A list containing 4 (A,B,C,D) or 2 A,B) points separated by
-comma. Points definine location of sets of boundaries. Points may not to be in
+comma. Points define location of sets of boundaries. Points may not to be in
map range, but it may lead to only 0 o 1 membership for the whole map. For
"both" side parameters range between A and D defines base, but range between B
and C core of the fuzzy set. Between A and B and C and D are set's boundaries.
If side is "both" it require 4 points, else 2 points. Points values must be
not-decreasing.
-<li><b>shape</b>: Parameter definied the shape of the fuzzy boundary. Available:
-<i>sshaped, linear, jshaped, gshaped</i>. The same boundaires are appled to
+<li><b>shape</b>: Parameter defined the shape of the fuzzy boundary. Available:
+<i>sshaped, linear, jshaped, gshaped</i>. The same boundaries are applied to
both sides of fuzzy set.
<li><b>hedge</b>: Shape modifier the positive number means dilatation (power the
-fuzzy set by 2) the negative means concetration (square root of fuzzy set). The
-number means number of dilatation/concetration applied on fuzzy set.
+fuzzy set by 2) the negative means concentration (square root of fuzzy set). The
+number means number of dilatation/concentration applied on fuzzy set.
<li><b>height</b>: Height modifier. Range from 0 to 1. The value 1 and indicate
-full membership beteen points B and C. If height is lesser than one the maximum
-memebrship is equal to height.
+full membership between points B and C. If height is lesser than one the maximum
+membership is equal to height.
</ul>
-<p>An example of fuzzy sets definiton:
+<p>An example of fuzzy sets definition:
<div class="code"><pre>$ moderate {both; 90,100,120,130; sshaped; 0; 1}</pre></div>
<b>Special notes about sets definition for output map:</b><br>
@@ -54,14 +54,14 @@
<div class="code"><pre>IF elev IS high AND distance IS low THEN probability IS small
where:
-antecetends: elev IS high; distance IS low
+antecedents: elev IS high; distance IS low
consequent: probability IS small
</pre></div>
The rule file has his own syntax. Because module creates only one result map,
-the map name is ommited. Every rule starts with $ and consist of consequent name
-and antecedents in braces { }. All maps and sets used in atecednets must be
-included in the maps file. At the begining of the calculation program checks if
+the map name is omitted. Every rule starts with $ and consist of consequent name
+and antecedents in braces { }. All maps and sets used in antecedents must be
+included in the maps file. At the beginning of the calculation program checks if
all names and sets are included in maps file. Names of the rules must be same as
sets names of the output map. The rules file use following symbols:
<ul>
@@ -73,7 +73,7 @@
</ul>
-<p>An example of fuzzy rules definiton:
+<p>An example of fuzzy rules definition:
<div class="code"><pre>
$ small {distance = high & elev = high}
</pre></div>
@@ -81,13 +81,13 @@
</dd>
</dl>
<h2>ADVANCED OPTIONS</h2>
-In most cases default options shoud not be changed.
+In most cases default options should not be changed.
<dl>
<dt><b>family</b></dt>
<dd>AND and OR operations in fuzzy logic are made with T-norms, T-conorms.
T-norms, T-conorms are a generalization of the two-valued logical conjunction
and disjunction used by boolean logic, for fuzzy logics. Because there is more
-than one possible generalisation of logial operations, r.fuzzy.system provides 6
+than one possible generalisation of logical operations, r.fuzzy.system provides 6
most popular families for fuzzy operations:
<ul>
<li><b>Zadeh</b> with minimum (Godel) t-norm and maximum T-conorm;
@@ -114,17 +114,17 @@
</TABLE>
</dd>
<dt><b>imp: implication </b></dt>
-<dd>Imlication determines the method of reshapening of consequents (fuzzy set)
+<dd>Implication determines the method of reshapening of consequents (fuzzy set)
by antecedents (single value) :
<ul>
-<li><b>minimum</b> means the lowest value of the antecedtents and output set
+<li><b>minimum</b> means the lowest value of the antecedents and output set
definition. It usually creates trapezoidal consequent set definition.
-<li><b>product</b> means the multiplication of the antecedtents and output set
+<li><b>product</b> means the multiplication of the antecedents and output set
definition. It usually creates triangular consequent set definition.
</ul>
</dd>
<dt><b>defuzz: defuzzification method</b></dt>
-<dd>Before defuzzification all consequents are agregated into one fuzzy set.
+<dd>Before defuzzification all consequents are aggregated into one fuzzy set.
Defuzzification is the process of conversion of aggregated fuzzy set into one
crisp value. The r.fuzzy.system provides 5 methods of defuzzification:
<ul>
@@ -137,8 +137,8 @@
</dd>
<dt><b>res: universe resolution</b></dt>
<dd>The universe is an interval between the lowest and highest values of
-consequent and agregated fuzzy sets. The resolution provides number of elements
-of these fuzzy sets. The minimum and maximum for univese is taken from the
+consequent and aggregated fuzzy sets. The resolution provides number of elements
+of these fuzzy sets. The minimum and maximum for universe is taken from the
minimal and maximal values of fuzzy set definition of output map Because it has
strong impact on computation time and precision of defuzzification, values lower
than 30 may impact on precision of final result, but values above 200 may slow
@@ -149,8 +149,8 @@
<dl>
<dt><b>coordinates</b></dt>
<dd>Coordinates of points for which output: universe, all consequents sets and
-agregate set. It is useful for visual presentation or detail analysis of fuzzy
-rules behaviour. In that cases calculations are peroforemd n=only for selected
+aggregate set. It is useful for visual presentation or detail analysis of fuzzy
+rules behaviour. In that cases calculations are performed n=only for selected
point.</dd>
<dt><b>membership only flag</b></dt>
<dd>Prints for all maps sat of values in map range (map universe) and values of
@@ -166,9 +166,9 @@
values defined in output universe. The output name must be the same as one of
maps in maps definition file.
</dd>
-<dt><b>multipe output flag</b></dt>
+<dt><b>multiple output flag</b></dt>
<dd>This flag is used to create fuzzified maps for every rule. The name of the
-map consist of otput map name, '_' and rule name (for example: output=probs and
+map consist of output map name, '_' and rule name (for example: output=probs and
rule name high, the map name: probs_high). Values of maps ranges from 0 to 1.
If map with such name exists will be overwritten without warning.
</dd>
@@ -219,8 +219,8 @@
IF elevation IS low OR distance IS near THEN risk IS probable
IF elevation IS high AND distance IS far THEN risk IS unprobable
</pre></div>
-In clasical boolean sense, we would taken some limits of ideas "near" "far" etc,
-but what about walues near the limit? The fuzzy set uses partial memberships
+In classical boolean sense, we would taken some limits of ideas "near" "far" etc,
+but what about values near the limit? The fuzzy set uses partial memberships
which abolish these restrictions. In that sense to set "near" belongs all areas
with distance no more than 100 m with full membership and from 100 to 200 m with
partial membership greater than 0. Over 200 m we can assume that is not near.
@@ -229,11 +229,11 @@
near: BELOW 100 = 1; FROM 100 TO 200 = {1 TO 0}; ABOVE 200 = 0;
</pre></div>
-To recive final map program calculate partial fuzzy set for all rules and next
-agregate it into one fuzzy set. These fuzzy sets are created on value sequence
+To receive final map program calculate partial fuzzy set for all rules and next
+aggregate it into one fuzzy set. These fuzzy sets are created on value sequence
called universe. Every set has the number of elements equal to universe
resolution. Such set cannot be stored as map so finally is defuzzified with
-method choosen by user.
+method chosen by user.
<p>
First we need two maps created with r.stream package:
@@ -284,7 +284,7 @@
r.fuzzy.system maps=flood.map rules=flod.rul output=flood
</pre></div>
-Resulting map should look like this below. Yellow color means no risk, red high
+Resulting map should look like this below. Yellow colour means no risk, red high
risk, green, blue end so on moderate risk.
<CENTER><img src="f_result.png" border="1"></CENTER><br>
Modified: grass-addons/grass7/raster/r.fuzzy.system/rule_parser.c
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.system/rule_parser.c 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.system/rule_parser.c 2014-07-09 09:48:15 UTC (rev 61210)
@@ -36,7 +36,7 @@
break; /*max index of output map */
if (n == 0)
- G_fatal_error(_("No defininition for output map: <%s> in map file"),
+ G_fatal_error(_("No definition for output map: <%s> in map file"),
output);
while (fgets(buf, sizeof buf, fd)) {
Modified: grass-addons/grass7/raster/r.fuzzy.system/system.c
===================================================================
--- grass-addons/grass7/raster/r.fuzzy.system/system.c 2014-07-09 08:49:06 UTC (rev 61209)
+++ grass-addons/grass7/raster/r.fuzzy.system/system.c 2014-07-09 09:48:15 UTC (rev 61210)
@@ -89,7 +89,7 @@
do {
if (s_rules[n].work_queue[i] == t_START) { /* first token */
if (i > 0)
- G_fatal_error("operator stack error, contact author");
+ G_fatal_error("Operator stack error, contact author");
operator_stack[opr_top] = t_START;
continue;
}
@@ -147,7 +147,7 @@
case A: /* accept */
if (!val_top)
- G_fatal_error("Stack error at end, contact autor");
+ G_fatal_error("Stack error at end, contact author");
return values_stack[val_top];
}
@@ -155,7 +155,7 @@
} while (s_rules[n].work_queue[i++] != t_STOP);
- G_fatal_error("Parse Stack empty, contact autor");
+ G_fatal_error("Parse Stack empty, contact author");
}
More information about the grass-commit
mailing list