graph_cycle3 — GRAPH motif op

• Data kinds: matrix → table

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

Usage

Number of directed 3-cycles i -> j -> k -> i as tr(B^3) / 3.

Each cycle is counted once (the trace visits it from each of its three starting nodes). Self-loops are removed first. Returns a dict with cycles3 and n.

A second, independent implementation (brute-force enumeration) agrees exactly on small graphs — pinned in the tests, because a single implementation of a counting formula cannot catch its own off-by-three.

Raises ValueError: as graph_degree_summary.

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

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 (motif)

—


*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.