The mapper.dotproduct.positive function consumes a vector as parameter (a LIST of DOUBLE) from the top of the stack.

The resulting mapper computes the dot product of the given vector with the values of the sliding window, then it sets all negative results to 0.

If the sliding window at a tick does not have the same size as the given vector, then no value is produced.

The resulting mapper can only be applied to values of type LONG or DOUBLE, it will produce no value for types STRING and BOOLEAN.

mapper.dotproduct.positive is available since version 1.0.0.

See also



NEWGTS 1 10 <% 'i' STORE $i 100 * NaN NaN NaN $i -1 $i ** * ADDVALUE %> FOR [ SWAP [ 1.0 0.1 ] mapper.dotproduct.positive 1 0 0 ] MAP