Description
Validate unique vertices and distinct from and to both listed.
Local graph quantities describe a vertex, an edge, or a small neighborhood. Their algebra often assumes a simple undirected graph; using the same expression for loops, multigraphs, or directed data can change its meaning.
Validate unique vertices and distinct from and to both listed.
When to use this tool
Use Graph: Complement Graph Single Pair Membership when you need a local graph quantity from explicitly supplied neighborhoods or counts.
How to use the tool and how it works
- Enter from, to, vertices, originalEdgePresent. 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.
Validate unique vertices and distinct from and to both listed. Return complementEdge as the opposite of originalEdgePresent inside result.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| from | From | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| to | To | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| vertices | Vertices | Required. Array of text. Implementation limit: 128 items. |
| originalEdgePresent | Original Edge Present | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated members; expand to inspect the fields below. | Required. Object. |
| result.complementEdge | Complement Edge | Calculated result member: boolean. |
{
"input": {
"from": "a",
"to": "b",
"vertices": [
"a",
"b"
],
"originalEdgePresent": false
},
"output": {
"result": {
"complementEdge": true
}
}
} Limitations and assumptions
- This is a single loop-free pair under a supplied original-edge flag, not construction or verification of a complete complement graph.
- 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.
Alternative or Complementary methods
Inspect the actual graph or run a full traversal when the claim depends on global structure. Match the algorithm's graph model to direction, loops, multiplicity, and connectivity requirements.
References
Similar or alternative tools
- Directed Complement One Node Degree
Subtract each from nodes-1 for the directed complement degrees.
- Directed Graph Density Loop Policy
Use n² possible edges when allowLoops or n(n-1) otherwise, require a positive denominator and edges within it, then divide.