Skip to content

Main content

Weighted Distance Zero Support Tool

Calculate weighted distance zero support from explicit caller-supplied inputs.

Loading tool…

Description

positiveSupport counts comparable positive-weight axes; totalWeight sums comparable weights; defined is true when at least one such weight is positive.

Weighted coordinate distances depend on whether weights multiply absolute differences or squared differences. Zero weights can make different vectors equivalent, and derivatives at a zero distance or absolute-value corner need explicit treatment.

positiveSupport counts comparable positive-weight axes; totalWeight sums comparable weights; defined is true when at least one such weight is positive.

When to use this tool

Use Weighted Distance Zero Support when checking one weighted-axis contribution, support rule or derivative.

How to use the tool and how it works

  1. Enter weights, comparable. Keep parallel arrays aligned. 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 positiveSupport, totalWeight, defined. Inspect defined before interpreting the associated values.

Require equally long nonnegative weights and comparable flags. positiveSupport counts comparable positive-weight axes; totalWeight sums comparable weights; defined is true when at least one such weight is positive.1

Input fieldMeaning and unitsAccepted input
weightsPosition-aligned nonnegative weights under the specified model convention.Required. Array of finite number; minimum 0; maximum items 256.
comparableComparableRequired. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
positiveSupportPositive SupportRequired. Safe integer.
totalWeightTotal WeightRequired. Finite number.
definedWhether the stated denominator has positive support; read this before interpreting a zero placeholder.Required. Boolean.
json
{
  "input": {
    "weights": [
      0,
      2,
      3
    ],
    "comparable": [
      true,
      false,
      true
    ]
  },
  "output": {
    "positiveSupport": 1,
    "totalWeight": 3,
    "defined": true
  }
}

Limitations and assumptions

  • This checks supplied support only. It does not compare coordinate values or compute a normalized distance, and empty or all-zero supported weights are undefined.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a complete distance implementation with an explicit weighting and missing-coordinate convention for vector comparison and optimization.

References

  1. Calculation and input contract: distance/weighted-distance-zero-support — tool.io

Similar or alternative tools