REDUCE


reducer framework
Since v1.0.5
Available on all platforms
See also

The REDUCE framework groups Geo Time Series™ by equivalence classes based on label values and applies a function on each equivalence class of Geo Time Series™, considering the values of each tick and producing one GTS per equivalence class.

As the selected reducer function is applied tick by tick, it is usually wise to BUCKETIZE the GTS first with a common value of lastbucket.

The labels whose values are common to all the GTS in an equivalence class will be retained.

Signature

Examples

NEWGTS 'a' RENAME { 'type' '1' } RELABEL 1 10 <% NaN NaN NaN 1 ADDVALUE %> FOR NEWGTS 'b' RENAME { 'type' '1' } RELABEL 1 10 <% NaN NaN NaN 1 ADDVALUE %> FOR NEWGTS 'a' RENAME { 'type' '2' } RELABEL 1 10 <% NaN NaN NaN 2 ADDVALUE %> FOR NEWGTS 'b' RENAME { 'type' '2' } RELABEL 1 10 <% NaN NaN NaN 2 ADDVALUE %> FOR 4 ->LIST [ SWAP [ 'type' ] reducer.product ] REDUCE