Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki_tests [2011/07/25 00:30] hermann |
wiki_tests [2011/07/31 02:47] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Calculate Map ====== | + | ===== Teste do Wiki ===== |
- | ===== Description ===== | + | ~~DISCUSSION:closed~~ |
- | This container calculates a map using algebraic/logical expression involving maps, tables and values. | + | {{gallery>:}} |
- | ===== Inputs ===== | + | <imageflow :images></imageflow> |
- | ^ Name ^ Type ^ Description ^ | + | {{page>wiki:syntax#Tables}} |
- | | Expression | [[Image Expression Type | Image Expression]] | Algebraic or logical expression used to calculate the output map. | | + | |
- | ===== Optional Inputs ===== | + | This is the Dinamica EGO Console Launcher |
- | ^ Name ^ Type ^ Description ^ Default Value ^ | + | [{{ :launcher.png |Janela do **console lancher do Dinamica**. Para maiores informares consulte http://www.csr.ufmg.br}}] |
- | | Cell Type | [[Cell Type Type | Cell Type]] | Data cell type | Signed 32 Bit Integer | | + | |
- | | Null Value | [[Int Type | Int]] | Null value | -2147483648 | | + | |
- | | Result Is Sparse | [[Bool Type | Bool]] | If true, the resulting map is created as a sparse image. Sparse images have the advantage of storing only the cells containing non-null values, but they have diminished access time. | False | | + | |
- | ===== Outputs ===== | + | [{{ :avatar_21.jpg|Um avatar qualquer}}] Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. |
+ | |||
+ | [{{:avatar_21.jpg |Outro avatar qualquer}}] Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. Testando o que ele quis dizer com fazer a tabela flutuar. Eu realmente não vejo como isso pode funcionar. | ||
- | ^ Name ^ Type ^ Description ^ | ||
- | | Result | [[Map Type | Map]] | Output map. | | ||
- | ===== Group ===== | ||
- | [[Functor List#Map Algebra | Map Algebra]] | ||
- | ===== Notes ===== | + | <m>S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}</m> |
- | The expression result is calculated as a real value and converted to the data cell type of the output map. | + | <m 8>delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }</m> |
- | If the calculation of the expression diverges or if the data cell type is not large enough, the corresponding cell is filled with the null value. | + | <m 32>delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3</m> |
- | List of mathematical and logical operators that can be employed in the logic/algebraic expression. | + | {{:dinamica.jpg|}} |
- | ==== General Operators ==== | + | [[dev:source_code|Obtenção do Código Fonte]] |
- | ^ Precedence ^ Operator ^ Description ^ Symbol ^ Usage Example ^ | + | <graphviz dot center 500x300> |
- | | 1 | Conditional | Execute the second or third term of the equation conditionally to the first | if@@@then@@@else | if not isNull(i1) and isNull(i2) then \\ @@@@@@i3 \\ else if isNull(i1) then \\ @@@@@@i1 – i1 / i2 \\ else (i1 / i2) ? (i1 – i2) | | + | digraph finite_state_machine { |
- | | 2 | Boolean Or | | or \\ <nowiki>||</nowiki> | not isNull(i1) or isNull(i2) \\ not isNull(i1) <nowiki>||</nowiki> isNull(i2) | | + | rankdir=LR; |
- | | ::: | Boolean And | | and \\ && | not isNull(i1) and isNull(i2) \\ not isNull(i1) && isNull(i2) | | + | size="9,5" |
- | | 3 | Equal | | = \\ == | i1 = 2 \\ i1 == 2 | | + | node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; |
- | | ::: | Not Equal | | != \\ /= \\ <> | i1 != 2 \\ i1 /= 2 \\ i1 <> 2 | | + | node [shape = circle]; |
- | | 4 | Greater Than | | > | i1 > 2 | | + | LR_0 -> LR_2 [ label = "SS(B)" ]; |
- | | ::: | Greater Than Or Equal | | >= | i1 >= 2 | | + | LR_0 -> LR_1 [ label = "SS(S)" ]; |
- | | ::: | Less Than | | < | i1 < i2 | | + | LR_1 -> LR_3 [ label = "S($end)" ]; |
- | | ::: | Less Than Or Equal | | <nowiki><=</nowiki> | i1 <nowiki><=</nowiki> i2 | | + | LR_2 -> LR_6 [ label = "SS(b)" ]; |
- | | 5 | Add | | + | i1 + i2 | | + | LR_2 -> LR_5 [ label = "SS(a)" ]; |
- | | ::: | Subtract | | – | i1 – i1 / i2 | | + | LR_2 -> LR_4 [ label = "S(A)" ]; |
- | | 6 | Times | | * | i1 * i2 | | + | LR_5 -> LR_7 [ label = "S(b)" ]; |
- | | ::: | Divide | | / | i1 / i2 | | + | LR_5 -> LR_5 [ label = "S(a)" ]; |
- | | ::: | Mod | | % | i1 % 100 | | + | LR_6 -> LR_6 [ label = "S(b)" ]; |
- | | 7 | Power | | <nowiki>^</nowiki> | i1 <nowiki>^</nowiki> 3 | | + | LR_6 -> LR_5 [ label = "S(a)" ]; |
- | | 8 | Catch Error | Catch an algebraic error and replace it with the result of another expression | ? | (i1 / i2) ? (i1 – i2) | | + | LR_7 -> LR_8 [ label = "S(b)" ]; |
- | | 9 | Boolean Not | | ! \\ not | not isNull(i1) \\ ! isNull(i1) | | + | LR_7 -> LR_5 [ label = "S(a)" ]; |
- | | ::: | Negate | | – | – ceil(i1 + i2) | | + | LR_8 -> LR_6 [ label = "S(b)" ]; |
+ | LR_8 -> LR_5 [ label = "S(a)" ]; | ||
+ | } | ||
+ | </graphviz> | ||
- | ==== General Functions ==== | + | <googlechart> |
+ | chs=200x125 | ||
+ | cht=gom | ||
+ | chd=t:70 | ||
+ | chco=FF0000,FF8040,FFFF00,00FF00,00FFFF,0000FF,800080 | ||
+ | chxt=x,y | ||
+ | chxl=0:|Groovy|1:|slow|faster|crazy" | ||
+ | </googlechart> | ||
- | ^ Operator ^ Description ^ Symbol ^ Usage Example ^ | + | <googlechart> |
- | | Value | | | 2 + i1 / -3.5e-2 | | + | chf=bg,lg,20,BBBBBB,1,E91B1B,2|c,ls,90,EFEFEF,0.25,BBBBBB,0.25 |
- | | Random | Generate a random value using the uniform probability distribution | rand | if rand > 0.5 then 1 else i2 | | + | chxr=0,0,46 |
- | | Squared Root | | sqrt() | sqrt(i1 / i4) | | + | chxs=0,676767,11.5,0,lt,676767 |
- | | Sin | Sin (input in radians) | sin() | sin(i1 / i4) | | + | chxt=y |
- | | Cos | Cos (input in radians) | cos() | cos(i1 + i2) | | + | chs=400x200 |
- | | Tan | Tan (input in radians) | tan() | tan(i1 * i5 + 6) | | + | cht=lc |
- | | Acos | Acos (output in radians) | acos() | acos(i1 + i2) | | + | chco=3D7930 |
- | | Asin | Asin (output in radians) | asin() | asin(i1 + i2) | | + | chd=s:bmitqZbQ |
- | | Atan | Atan (output in radians) | atan() | atan(i1 + i2) | | + | chdl=Dados+Aleatórios |
- | | Ceil | | ceil() | ceil(i1 + i2) | | + | chg=14.3,-1,1,1 |
- | | Exp | | exp() | exp(i1[i1 + i2]) | | + | chls=2,4,0 |
- | | Floor | | floor() | floor(i1 + i2) | | + | chm=B,C5D4B5BB,0,0,0 |
- | | Round | | round() | round(i1 / i4) | | + | chtt=Teste+de+Gráfico |
- | | Abs | | abs() | abs(i1 + i2) | | + | chts=676767,14.5 |
- | | Ln | | ln() | ln(i1 / i4) | | + | </googlechart> |
- | | Log | | log() | log(i1 / i4) | | + | |
- | | Max | | max() | max(i1, i2) | | + | |
- | | Min | | min() | min(i1, i4) | | + | |
- | | Signal | Return +1, if the expression is positive, -1, if it is negative, and 0, otherwise. | signal() | signal(i1 - 4) | | + | |
- | | Abort | Abort the model execution | abort | if i1 > 0 then i1 * i2 + 4 else abort | | + | |
- | + | ||
- | ==== Value Operators ==== | + | |
- | + | ||
- | ^ Operator ^ Description ^ Symbol ^ Usage Example ^ | + | |
- | | Get Variable Value | Return the variable value | vX \\ where X is an integer value from 1 to 100 | v1 + t1[v2 + 4] | | + | |
- | + | ||
- | ==== Image Operators and Functions ==== | + | |
- | + | ||
- | ^ Operator ^ Description ^ Symbol ^ Usage Example ^ | + | |
- | | Get Image Value | Return the image value at the current cell | iX \\ where X is an integer value from 1 to 100 | i2 | | + | |
- | | Get Image Value At Location | Return the image value on the specified cell coordinate | iX[ , ] \\ where X is an integer value from 1 to 100 | i1[line – 1, column – 2] | | + | |
- | | Get Image Null Value | Return the null value of the current image | null \\ null(iX) | if i1 > 2 then i1 else null \\ if null(i2) > 2 then 1 else null | | + | |
- | | Is Null | | isNull(iX) \\ where X is an integer value from 1 to 100 | if not isNull(i1) then i1 else i2 | | + | |
- | | Get Line Number | Return the line number of the current cell | line | line + 1 | | + | |
- | | Get Column Number | Return the column number of the current cell | column | if column / 2 > 50 then 1 else null | | + | |
- | + | ||
- | ==== Table Operators ==== | + | |
- | + | ||
- | Table operators return the value corresponding to a given key according to a rule-operator. | + | |
- | + | ||
- | It uses the following syntax: tX[N ] \\ where: X is a table identifier; N is the rule-operator. | + | |
- | + | ||
- | ^ Operator ^ Description ^ Symbol ^ Usage Example ^ | + | |
- | | Get Table Value | Return the table value in the X key position of the table | tX[ ] \\ where X is an integer value from 1 to 100 | t2[i1 + 2] | | + | |
- | | Get Table Equal Lower Bound Value | Return the table value in the greater key less than or equal to the X key position of the table. | tX[<nowiki><=</nowiki> ] \\ tX{ } \\ where X is an integer value from 1 to 100 | 2[<nowiki><=</nowiki> 14] \\ t2{14} | | + | |
- | | Get Table Lower Bound Value | Return the table value in the greater key less than the X key position of the table. | tX[< ] \\ where X is an integer value from 1 to 100 | t2[< i1 + 2] | | + | |
- | | Get Table Equal Upper Bound Value | Return the table value in the lesser key greater than or equal to the X key position of the table. | tX[>= ] \\ where X is an integer value from 1 to 100 | t2[>= i1 + i3]= | | + | |
- | | Get Table Upper Bound Value | Return the table value in the lesser key greater than the X key position of the table. | tX[> ] \\ where X is an integer value from 1 to 100 | t2[> i7] | | + | |
- | | Get Table Closest Value | Return the table value in the key closest to the X key position of the table. | tX[>< ] \\ where X is an integer value from 1 to 100 | t2[>< 3 + i7] | | + | |
- | | Get Table Interpoled Value | Return a linear interpoled value drawn through the neighbor keys of the X key position of the table. | tX[/ ] \\ where X is an integer value from 1 to 100 | t2[/ i2] | | + | |
- | | Test Table Key | Return 1, if expression corresponds to a key stored in the table, and 0, otherwise. | tX[? ] \\ tX[=? ] \\ tX[==? ] \\ where X is an integer value from 1 to 100 | t2[? i2] \\ t2[=? i2] | | + | |
- | + | ||
- | ==== Image Neighborhood Functions ==== | + | |
- | + | ||
- | Neighborhood operators return the value of an operation within a defined neighborhood window. | + | |
- | It uses the following syntax: nbN(iX, h, w, y, x) \\ where: N is the operator name; X is an image identifier; h is the number of window lines; w is the number of window columns; y is the line where the window center is anchored at the image; x is the column where the window center is anchored at the image. | + | |
- | + | ||
- | The calculation usually includes the center of the window. | + | |
- | + | ||
- | Even-sided windows have the center displaced toward the top left corner. | + | |
- | + | ||
- | The window anchor (y and x) can be omitted when the window center is anchored at the current line and column. The shortened syntax is: nbN(iX, h, w) | + | |
- | + | ||
- | ^ Operator ^ Description ^ Symbol ^ Usage Example ^ | + | |
- | | Min | Returns the minimum value of the neighbor non-null cells. | nbMin() | nbMin(i4, 2, 3, line-1, column) | | + | |
- | | Max | Returns the maximum value of the neighbor non-null cells. | nbMax() | nbMax(i1, 4, 4) - 1 | | + | |
- | | Sum | Returns the sum of the neighbor non-null cells. | nbSum() | nbSum(i3, 5, 5) + 7 | | + | |
- | | Product | Returns the product of the neighbor non-null cells. | nbProd() | if not isNull(i1) then nbProd(i1, 2, 2, 0, column) else 0 | | + | |
- | | Count | Returns the number of neighbor non-null cells. | nbCount() | nbCount(i2, 3, 3) + nbCount(i1, 3, 3, line, column+3) | | + | |
- | | Average | Returns the arithmetic mean of the neighbor non-null cells. | nbAverage() | round(nbAverage(i1, 7, 7)) | | + | |
- | | Median | Returns the median value of the neighbor non-null cells. For an even number of values, the greater of the two median values is returned. | nbMedian() | nbMedian(i1, 5, 5) | | + | |
- | | Mode | Returns the mode of the neighbor non-null cells. If a mode does not exist, null is returned. If there is more than one, the lesser one is returned. | nbMode() | nbMode(i1, 5, 5) | | + | |
- | | Variance | Returns the variance of the values of the neighbor non-null cells according to the expression: \\ <m 10>sigma^2 = {1/{n-1}}sum{i=1}{n}{(x_i-X)^2}</m> \\ where x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>i</sub> are the neighbor cells; X is the mean of the neighbor cells. | nbVar() | nbVar(i4, 7, 7) / 25 | | + | |
- | | Standard Deviation | Returns the standard deviation of the neighbor non-null cells according to the expression: \\ <m 8>sigma = sqrt{{1/{n-1}}sum{i=1}{n}{(x_i-X)^2}}</m> \\ where x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>i</sub> are the neighbor cells; X is the mean of the neighbor cells. | nbStdDev() | nbStdDev(i2, 3, 3, line-1, column) + nbStdDev(i2, 3, 3) + nbStdDev(i2, 3, 3, line+1, column) | | + | |
- | + | ||
- | ===== Internal Name ===== | + | |
- | CalculateMap | + | <googlechart> |
+ | cht=gv:neato | ||
+ | chl=digraph{A->B->C->A;B->D;D->A} | ||
+ | chs=150x150 | ||
+ | </googlechart> | ||