An auxiliary graph element that repeats the channels of an input signal, allowing for example for an exhaustive element-wise combination with another signal.
Normally, the way multi-channel expansion works is that when two signals are combined, the output signal has a number of channels that is the ''maximum'' of the individual number of channels, and channels will be automatically wrapped around.
For example, in x * y
if x
has three and
y
has five channels, the result expands to
Seq[GE](
x.out(0) * y.out(0), x.out(1) * y.out(1),
x.out(2) * y.out(2), x.out(0) * y.out(3),
x.out(1) * y.out(4)
)
Using this element, we can enforce the appearance of all combinations of channels, resulting in a signal whose number of channels is the ''sum'' of the individual number of channels.
For example, RepeatChannels(x, 5)
expands to
Seq[GE](
x.out(0), x.out(0), x.out(0), x.out(0), x.out(0),
x.out(1), x.out(1), x.out(1), x.out(1), x.out(1),
x.out(2), x.out(2), x.out(2), x.out(2), x.out(2)
)
And RepeatChannels(x, 5) * y
accordingly expands to
the fifteen-channels signal
Seq[GE](
(x out 0) * (y out 0), (x out 0) * (y out 1), (x out 0) * (y out 2), (x out 0) * (y out 3), (x out 0) * (y out 4),
(x out 1) * (y out 0), (x out 1) * (y out 1), (x out 1) * (y out 2), (x out 1) * (y out 3), (x out 1) * (y out 4),
(x out 2) * (y out 0), (x out 2) * (y out 1), (x out 2) * (y out 2), (x out 2) * (y out 3), (x out 2) * (y out 4)
)
- Value Params
- a
the signal whose channels to repeat
- num
the number of repetitions for each input channel
- See also
- Companion
- object