Two clocks.
One stream, aligned.
Enter two sequences and the interval between consecutive elements of
each (as a rational number, e.g. 2/3, or a decimal, e.g. 0.5).
The operator aligns them at the combined interval
Δc = min(Δ1, Δ2), pairing every tick of the faster
stream with the matching tick of the slower one.
Intervals
Combined sequence
FROM core0+core1
The faster clock sets the pace
Sum joins two regular streams side by side. The result ticks as often as the faster input; each of its ticks carries the current value of both inputs.
Faster leads
The output interval is the shorter of the two, Δc = min(Δ1, Δ2). Every element of the faster stream appears exactly once, in order.
Slower holds
The slower stream is read at the matching tick, so its value repeats until its next element arrives — no interpolation, no guessing.
Exact
The matching tick is an integer floor over rational intervals. For any pair of regular intervals the pairing is the same on every run, down to the bit.
The same operator, in a query
In RQL, sum is written + between two streams. Here
core0 ticks every 1/10 and core1 every 1/5,
so str1 ticks every 1/10.
The formal definition and proof are in the paper. See the full query, plan and output tuples on the home page.