Description
equalKeys compares the keys; stableIfInThisOrder is true for unequal keys or increasing original indices.
Ordering and stability are different properties. A stable operation preserves original order among equal keys, while an insertion policy determines which side of an existing equal key receives a new item.
equalKeys compares the keys; stableIfInThisOrder is true for unequal keys or increasing original indices.
When to use this tool
Use List: List Equal Key Stability Pair when you need one explicit key comparison or stability condition.
How to use the tool and how it works
- Enter firstKey, secondKey, firstOriginalIndex, secondOriginalIndex. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require distinct original indices. equalKeys compares the keys; stableIfInThisOrder is true for unequal keys or increasing original indices.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstKey | First Key | Required. Finite number. |
| secondKey | Second Key | Required. Finite number. |
| firstOriginalIndex | First Original Index | Required. Safe integer. |
| secondOriginalIndex | Second Original Index | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.equalKeys | Equal Keys | Calculated result member: boolean. |
| result.stableIfInThisOrder | Stable If In This Order | Calculated result member: boolean. |
{
"input": {
"firstKey": 2,
"secondKey": 2,
"firstOriginalIndex": 5,
"secondOriginalIndex": 3
},
"output": {
"result": {
"equalKeys": true,
"stableIfInThisOrder": false
}
}
} Limitations and assumptions
- This assesses stability for a pair, not whether unequal keys are sorted or a complete ordering is valid.
- Outputs are nested inside result. 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
Check the complete comparator and ordering rule when sorting or inserting an actual collection.
References
Similar or alternative tools
- List: List Insertion Side Tie Policy
Insert before when incomingKey is smaller, or when keys are equal and equalPolicy is before.
- List Run Length One Boundary Update
Compare leftValue and rightValue exactly.