Description
Compare edge IDs literally and compare endpoint order, allowing reversed endpoints only when directed is false.
Graph identifiers and endpoints describe different kinds of equality. Two edges can connect the same vertices while remaining distinct records, and serialized numeric or string identifiers can lose distinctions during parsing or normalization.
Compare edge IDs literally and compare endpoint order, allowing reversed endpoints only when directed is false.
When to use this tool
Use Multigraph Parallel Edge Identity Token when you need a literal identifier or endpoint comparison with explicit coercion rules.
How to use the tool and how it works
- Enter firstId, secondId, firstFrom, firstTo, secondFrom, secondTo, directed. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sameIdentity, parallelEndpoints, distinctParallelEdges. Inspect sameIdentity, parallelEndpoints, distinctParallelEdges before interpreting the associated values.
Compare edge IDs literally and compare endpoint order, allowing reversed endpoints only when directed is false. Mark distinctParallelEdges for unequal IDs with matching endpoints under that rule.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstId | First Id | Required. Text; maximum UTF-16 length 8192. |
| secondId | Second Id | Required. Text; maximum UTF-16 length 8192. |
| firstFrom | First From | Required. Text; maximum UTF-16 length 8192. |
| firstTo | First To | Required. Text; maximum UTF-16 length 8192. |
| secondFrom | Second From | Required. Text; maximum UTF-16 length 8192. |
| secondTo | Second To | Required. Text; maximum UTF-16 length 8192. |
| directed | Directed | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sameIdentity | Same Identity | Required. Boolean. |
| parallelEndpoints | Parallel Endpoints | Required. Boolean. |
| distinctParallelEdges | Distinct Parallel Edges | Required. Boolean. |
{
"input": {
"firstId": "e1",
"secondId": "e2",
"firstFrom": "A",
"firstTo": "B",
"secondFrom": "B",
"secondTo": "A",
"directed": false
},
"output": {
"sameIdentity": false,
"parallelEndpoints": true,
"distinctParallelEdges": true
}
} Limitations and assumptions
- Same ID with inconsistent endpoints still has sameIdentity true; graph membership, identifier authenticity, and the actual multiplicity are not verified.
- 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
Retain original identifiers and use a declared canonical representation for storage. Resolve actual edge identity through the graph's data model rather than endpoint coincidence alone.
References
Similar or alternative tools
- Edge List Single Edge Canonical Order
Compare source and target using JavaScript string ordering, swap them when source is greater, and return reversed.
- Edge Reciprocity Indicator
Return reciprocal when both flags are true and count one edge for a present self-loop or the separate directed flags otherwise.