Skip to content

Main content

Directed Edge Incidence Column Sum Tool

Use oriented incidence -1 at the source and +1 at the target, including cancellation for a loop.

Loading tool…

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

  1. Enter source, target. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read sum, nonzeroEntries. Use the output convention below.

Return sum zero and nonzeroEntries zero for equal source and target, otherwise two.1

Input fieldMeaning and unitsAccepted input
sourceSourceRequired. Text; maximum UTF-16 length 8192.
targetTargetRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
sumSumRequired. Safe integer.
nonzeroEntriesNonzero EntriesRequired. Safe integer.
json
{
  "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

  1. Calculation and input contract: graph/directed-edge-incidence-column-sum — tool.io

Similar or alternative tools