Description
Sum degrees exactly to degreeSumDecimal and return the number of distinct supplied neighbors.
A graph's degree records how many edge incidences meet a vertex. Directed edges distinguish incoming and outgoing incidences, while loops and parallel edges require explicit counting conventions; a local degree formula does not reconstruct a graph.
Sum degrees exactly to degreeSumDecimal and return the number of distinct supplied neighbors.
When to use this tool
Use Vertex Neighbor Degree Sum when you need a degree or incidence calculation under the stated graph convention.
How to use the tool and how it works
- Enter neighborIds, neighborDegrees. 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 degreeSumDecimal, distinctNeighbors. Use the output convention below.
Require aligned unique neighborIds and nonnegative integer neighborDegrees. Sum degrees exactly to degreeSumDecimal and return the number of distinct supplied neighbors.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| neighborIds | Neighbor Ids | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| neighborDegrees | Neighbor Degrees | Required. Array of safe integer; minimum 0; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| degreeSumDecimal | Exact sum of supplied neighboring degrees as decimal text; neighbors must be unique. | Required. Text; maximum UTF-16 length 8192. |
| distinctNeighbors | Distinct Neighbors | Required. Safe integer. |
{
"input": {
"neighborIds": [
"a",
"b"
],
"neighborDegrees": [
3,
4
]
},
"output": {
"degreeSumDecimal": "7",
"distinctNeighbors": 2
}
} Limitations and assumptions
- The source graph is not supplied, so adjacency, degree correctness, graph simplicity, and a global graph invariant are not verified; retain the exact total as a string.
- 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
Build an adjacency structure and count actual incidences when a full graph is available. Validate loop, multiplicity, direction, and vertex-set assumptions before applying a simple-graph identity.
References
Similar or alternative tools
- Line Graph One Edge Degree
Require positive integer sourceDegree and targetDegree and return their sum minus two.
- Edge Endpoint Degree Product
Require nonnegative integer firstDegree and secondDegree and return their exact product as productDecimal.