Description
Count strictly positive, strictly negative, and exact-zero row entries.
Sign counts classify entries as positive, negative, or zero independently of their magnitudes. Equal positive and negative counts need not imply a small or zero sum.
Count strictly positive, strictly negative, and exact-zero row entries.
When to use this tool
Use Matrix Row Balanced Sign Count when you need a literal sign-count diagnostic for a row.
How to use the tool and how it works
- Enter row. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read positiveCount, negativeCount, zeroCount, balanced. Inspect balanced before interpreting the associated values.
Count strictly positive, strictly negative, and exact-zero row entries. Mark balanced when positive and negative counts agree.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| row | Row | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| positiveCount | Positive Count | Required. Safe integer. |
| negativeCount | Negative Count | Required. Safe integer. |
| zeroCount | Zero Count | Required. Safe integer. |
| balanced | Balanced | Required. Boolean. |
{
"input": {
"row": [
2,
-3,
0
]
},
"output": {
"positiveCount": 1,
"negativeCount": 1,
"zeroCount": 1,
"balanced": true
}
} Limitations and assumptions
- Balanced counts do not imply zero sum or small magnitude; signed zeros enter zeroCount.
- 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
Inspect magnitudes and numerical tolerances separately when assessing balance or cancellation.
References
Similar or alternative tools
- Row Signed Sum Cancellation Term
Sum the row with magnitude-aware compensation and independently sum absolute values the same way.
- Matrix Two Row Inner Product Term
Require equal-length left and right arrays, multiply corresponding elements into terms, and sum those products.