I want to create a circuit that outputs all Red signals that are equal to the Green signal.
Here's my attempt, using Each signal in a Decider combinator. Why doesn't it work? I tried several variations on this, and wasn't able to create this.
My overall goal is to filter out all signals which are less than the maximum, calculated via a Selector.
Why this circuit doesn't work?
Why this circuit doesn't work?
- Attachments
-
- Screenshot 2024-11-02 at 20.06.59.png (97.26 KiB) Viewed 150 times
-
- Screenshot 2024-11-02 at 20.06.41.png (439.91 KiB) Viewed 150 times
Re: Why this circuit doesn't work?
What you do is compare in the screenshot is if every signal on the red wire is equal to the same signal on the green wire. Since actually there are all different signals on both wires, this condition isn't true for any signal, so your output is empty. It does this for EACH signal. I guess you want to ignore signals and compare values, so you want to get the B=4 and C=4 as output, isn't it?
With a condition EACH[red] = <check>[green] and output EACH input count[red] you could achieve this. Each signal on red is compared to <check> on green, and for each being equal, it's output if it comes from red.
With a condition EACH[red] = <check>[green] and output EACH input count[red] you could achieve this. Each signal on red is compared to <check> on green, and for each being equal, it's output if it comes from red.
Re: Why this circuit doesn't work?
Oh, thanks, I got it. I thought that Each on two sides would do a cartesian product :) My problem was that in the actual implementation, the "Checkmark" signal would be computed dynamically. I side-stepped this problem by converting the dynamic signal to a static "Checkmark" via an additional arithmetic combinator, which multiplies Each by 1 and outputs a "Checkmark".