graph_degree_summary — GRAPH degree op

• Data kinds: matrix → table

• Call: import fullseye as fs; fs.ledger.graph_degree_summary(adj) (to call the implementation directly, import graphinv; graphinv.graph_degree_summary(adj); from the registry, opsgraph.get("graph_degree_summary"))

Usage

Degrees, density and reciprocity of a directed wiring matrix.

`adj is a square matrix; entry (i, j) > 0 means an edge i -> j`. Self-loops

are counted separately and excluded from the edge statistics. Returns a dict with

`n, edges, self_loops, the in_degree / out_degree` arrays,

`density (edges / (n (n-1))), and reciprocal_pairs` (unordered pairs wired

in both directions).

The identity `in_degree.sum() == out_degree.sum() == edges` holds exactly for

any directed graph and is checked before returning (fail-closed — if it ever broke,

the matrix was not what the caller thought).

Raises `ValueError`: non-square / empty / non-finite / negative input, or a

matrix over the node cap.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• graphinv_three_phyla — py -3.11 examples/graphinv_three_phyla.py

• poc_connectome_lr_symmetry — py -3.11 examples/poc_connectome_lr_symmetry.py

Ops the type connects to (they accept table as input)

graph_edge_consensus · graph_core_persistence · tree_morphometry · tree_sholl · tree_run_length

Same category (degree)

—


*Provenance: graphinv.py — GRAPH operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.