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
- Enter weights, comparable. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| weights | Position-aligned nonnegative weights under the specified model convention. | Required. Array of finite number; minimum 0; maximum items 256. |
| comparable | Comparable | Required. Array of boolean; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| positiveSupport | Positive Support | Required. Safe integer. |
| totalWeight | Total Weight | Required. Finite number. |
| defined | Whether the stated denominator has positive support; read this before interpreting a zero placeholder. | Required. Boolean. |
{
"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
Similar or alternative tools
- Weighted Distance Zeroaxis Equivalence Flag
equivalent is true when every positive-weight coordinate matches exactly; differingIgnoredAxes lists zero-weight indexes whose values differ.
- Weighted Absolute Gap Term
contribution = abs(first-second)*weight.