HeavisideLink

From OpenCog
Jump to: navigation, search

The HeavisideLink is a kind of FunctionLink that represents the Heaviside step function. It is a functional version of the GreaterThanLink.

For example,

(HeavisideLink
    (MinusLink
       (NumberNode 2 3 4 5 6)
       (NumberNode 6 5 4 3 2)))

evaluates to

(NumberNode 0 0 0 1 1)
  

This is a vector representation of a greater-than operation on the two lists of numbers: the first three are not greater than, but the last two are greter than the corresponding numbers in the second row.

See also