Allow comparison between *Each and *Everything in decider combinators.
Posted: Thu Dec 10, 2020 7:06 am
This is equivalent to performing the chosen operation on each individual input channel, then summing the results. This can be implemented already with the current combinators, but must be done with a specific channel in each combinator and then the outputs summed via ganging on the same wire. This rapidly becomes unwieldy if you are interested in more than one or two channels at a time. For example, finding the maximum value amongst a set of N channels requires N+2 combinators using this method; a roboport or smart train station could easily have dozens of channels of interest.
However, an *Everything OPERAND *Each option would be precisely logically equivalent to those ganged combinators, would be able to handle arbitrary inputs, and would allow for a significant compaction of any build that needs to perform them.
Sample outputs for the set of signals {A = 2; B = 2; C = 3; D = 4}:
*Everything LESS THAN *Each:
Output:
{D = 4} if *Each or D are the output channels and "Input Value" is selected
{} if a channel other than D is the output channel and "Input Value" is selected
{Channel = 1} if any channel is chosen as the output channel and "1" is selected.
*Everything LESS THAN OR EQUAL *Each
Output:
Identical to above.
*Everything EQUAL TO *Each
Output:
{} in all cases.
*Everything GREATER THAN OR EQUAL *Each
Output:
{A = 2; B = 2} if *Each is the output channel and "Input Value" is selected.
{A = 2} or {B = 2} if A or B, respectively, is the output channel and "Input Value" is selected.
{} if neither A nor B is selected as the output channel and "Input Value" is selected.
{A = 1; B = 1} if *Each is the output channel and "1" is selected.
{Channel = 2} if any channel is selected and "1" is selected.
*Everything GREATER THAN *Each
Output:
{} in all cases.
*Everything NOT EQUAL TO *Each
Output:
{A = 2; B = 2} if *Each and "Input Value" is selected.
{A = 2} or {B = 2} if either A or B, respectively, is selected as the output channel and "Input Value" is selected.
{} if neither A nor B is selected as the output channel and "Input Value" is selected.
{A = 1; B = 1} if *Each is the output channel and "1" is selected.
{Channel = 2} if any channel is selected and "1" is selected.
However, an *Everything OPERAND *Each option would be precisely logically equivalent to those ganged combinators, would be able to handle arbitrary inputs, and would allow for a significant compaction of any build that needs to perform them.
Sample outputs for the set of signals {A = 2; B = 2; C = 3; D = 4}:
*Everything LESS THAN *Each:
Output:
{D = 4} if *Each or D are the output channels and "Input Value" is selected
{} if a channel other than D is the output channel and "Input Value" is selected
{Channel = 1} if any channel is chosen as the output channel and "1" is selected.
*Everything LESS THAN OR EQUAL *Each
Output:
Identical to above.
*Everything EQUAL TO *Each
Output:
{} in all cases.
*Everything GREATER THAN OR EQUAL *Each
Output:
{A = 2; B = 2} if *Each is the output channel and "Input Value" is selected.
{A = 2} or {B = 2} if A or B, respectively, is the output channel and "Input Value" is selected.
{} if neither A nor B is selected as the output channel and "Input Value" is selected.
{A = 1; B = 1} if *Each is the output channel and "1" is selected.
{Channel = 2} if any channel is selected and "1" is selected.
*Everything GREATER THAN *Each
Output:
{} in all cases.
*Everything NOT EQUAL TO *Each
Output:
{A = 2; B = 2} if *Each and "Input Value" is selected.
{A = 2} or {B = 2} if either A or B, respectively, is selected as the output channel and "Input Value" is selected.
{} if neither A nor B is selected as the output channel and "Input Value" is selected.
{A = 1; B = 1} if *Each is the output channel and "1" is selected.
{Channel = 2} if any channel is selected and "1" is selected.