Description
Return sum zero and nonzeroEntries zero for equal source and target, otherwise two.
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.
Return sum zero and nonzeroEntries zero for equal source and target, otherwise two.
When to use this tool
Use Directed Edge Incidence Column Sum when you need a degree or incidence calculation under the stated graph convention.
How to use the tool and how it works
- Enter source, target. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sum, nonzeroEntries. Use the output convention below.
Return sum zero and nonzeroEntries zero for equal source and target, otherwise two.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| source | Source | Required. Text; maximum UTF-16 length 8192. |
| target | Target | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sum | Sum | Required. Safe integer. |
| nonzeroEntries | Nonzero Entries | Required. Safe integer. |
{
"input": {
"source": "a",
"target": "b"
},
"output": {
"sum": 0,
"nonzeroEntries": 2
}
} Limitations and assumptions
- This assumes opposite signed source and target entries that cancel on a self-loop; it does not construct or validate an actual incidence column.
- 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
- Directed Edge Source Target Incidence Sign
Return one when vertex matches target, minus one when it matches source, with cancellation for a self-loop.
- Directed Complement One Node Degree
Subtract each from nodes-1 for the directed complement degrees.