User Tools

Site Tools


netweaver:nodes:compare

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

netweaver:nodes:compare [2020/10/04 16:11] – external edit 127.0.0.1netweaver:nodes:compare [2020/10/04 18:24] (current) bjmiller
Line 1: Line 1:
 +====== Description ======
 +
 +This is a collection of fuzzy-based nodes which do direct arithmetic comparisons:
 +^ symbol ^ description ^
 +| ''<'' | less than |
 +| ''<''''='' | less than or equal to |
 +| ''=='' | equal to |
 +| ''>='' | greater than or equal to |
 +| ''>'' | greater than |
 +| ''!='' | not equal to |
 +
 +====== Constraints ======
 +  * Minimum number of child-nodes: 2
 +  * Maximum number of child-nodes: 3
 +
 +====== Calculus ======
 +If the compare node has just two child-nodes then the calculation is straight forward and is exactly as stated in the description and the node calculates to true (+1) or false (-1) if both child-nodes have valid values, otherwise it will calculate to undetermined (0).
 +
 +^ operator ^ Value<sub>1</sub> ^ Value<sub>2</sub> ^ output ^
 +| ''<'' | 3 | 4 | true (+1) |
 +| ''<'' | 4 | 4 | false (-1) |
 +| ''<'' | 4 | 3 | false (-1) |
 +| ''<''''='' | 3 | 4 | true (+1) |
 +| ''<''''='' | 4 | 4 | true (+1) |
 +| ''<''''='' | 4 | 3 | false (-1) |
 +
 +If the compare node has three child-nodes then the third node is used to define a fuzzy curve to transition the calculation.  In general (the ''!='' is opposite) the second node defines the true point on the fuzzy curve and the third point defines how far from the second node the false point is (the transition distance). 
 +
 +Note that in this mode ''<'' and ''<''''='' are functionally equivalent as is ''>'' and ''>=''.
 +
 +^ operator ^ Value<sub>1</sub> ^ Value<sub>2</sub> ^ Value<sub>3</sub> ^ output ^
 +| ''<'' | 3 | 4 | 2 | true (+1) |
 +| ''<'' | 4 | 4 | 2 | true (+1) |
 +| ''<'' | 4.5 | 4 | 2 | +0.5 |
 +| ''<'' | 5.0 | 4 | 2 | 0 |
 +| ''<'' | 5.5 | 4 | 2 | -0.5 |
 +| ''<'' | 6 | 4 | 2 | false (-1) |
 +| ''=='' | 2 | 4 | 2 | false (-1) |
 +| ''=='' | 3 | 4 | 2 | 0 |
 +| ''=='' | 4 | 4 | 2 | true (+1) |
 +| ''=='' | 5 | 4 | 2 | 0 |
 +| ''=='' | 6 | 4 | 2 | false (-1) |