Skip to content

Main content

List Mask Count Delta

Compare explicit Boolean list-mask selection counts after validating equal mask lengths.

Loading tool…

Description

Compare selected counts in two aligned Boolean masks.

List operations require explicit linear indices, mask alignment, chunk boundaries and empty-list policy. A selected-count change does not identify which positions changed, and an exact-multiple remainder may produce an optional empty chunk. These helpers use supplied lengths or masks rather than inspecting or modifying a list of values.

Compare selected counts in two aligned Boolean masks.

When to use this tool

Use List Mask Count Delta when you already have beforeMask, afterMask and need to compare selected counts in two aligned Boolean masks.

How to use the tool and how it works

  1. Enter beforeMask, afterMask. Follow any array-alignment requirements below. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read selectedBefore, selectedAfter, delta. Use the output convention below.

Require equal lengths; count true values before and after and return after-before delta.1

Input fieldMeaning and unitsAccepted input
beforeMaskBefore MaskRequired. Array of boolean; maximum items 256.
afterMaskAfter MaskRequired. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
selectedBeforeSelected BeforeRequired. Safe integer.
selectedAfterSelected AfterRequired. Safe integer.
deltaDeltaRequired. Safe integer.
json
{
  "input": {
    "beforeMask": [
      true,
      false,
      false
    ],
    "afterMask": [
      true,
      true,
      false
    ]
  },
  "output": {
    "selectedBefore": 1,
    "selectedAfter": 2,
    "delta": 1
  }
}

Limitations and assumptions

  • No underlying list is modified; equal counts do not mean the same positions are selected.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Operate on the actual list when contents, identity or reordered values matter. State the index origin and empty-chunk policy in the full processing workflow; local counts and masks do not establish a valid transformation of underlying data.

References

  1. Calculation and input contract: list/list-mask-count-delta — tool.io

Similar or alternative tools