ApplyOpToTsSet function

The ApplyOpToTsSet function applies a binary arithmetic function to a set of time series.

Syntax

ApplyOpToTsSet(func_name   lvarchar, 
              multiset_ts multiset(TimeSeries)) 
returns TimeSeries;
func_name
The name of a binary function. See Binary arithmetic functions for more information.
multiset_ts
A multiset of time series that are compatible with the function. All the time series in the multiset must have the same type.

Description

All the time series must have the same type. If the multiset is empty, then ApplyOpToTsSet returns NULL. If the multiset contains only one time series, then ApplyOpToTsSet returns a copy of that time series. If the multiset contains exactly two time series, ts1 and ts2, then ApplyOpToTsSet returns ApplyBinaryTsOp(func_name, ts1, ts2). If the multiset contains three time series, ts1, ts2, and ts3, then ApplyOpToTsSet returns ApplyBinaryTsOp(func_name, ApplyBinaryTsOp(func_name, ts1, ts2), ts3), and so on.

Returns

A time series of the same type as the time series in the multiset. The calendar of the resulting time series is the union of the calendars of the input time series. The resulting time series is regular if all the input times series are regular and irregular if any of the inputs are irregular.