Skip to main content
MRPC is the cyclomatic complexity analogue for a Markdown file. It builds a document navigation graph G_doc = (N, E) where nodes are sections, large code blocks, diagrams, footnotes, linked repository documents, and external domains, and edges are sequential, parent-child, internal-link, relative-link, external-link, and artifact-explanation relations.

Classical form

where P is the number of connected components.

Weighted form

Edges carry weights to reflect different navigation costs:

Interpretation

A tutorial with MRPC = 20 is suspect; an API index with MRPC = 20 is normal. Use profile-specific thresholds rather than a universal cap.

References

  • McCabe, T. J. (1976). A Complexity Measure. IEEE Transactions on Software Engineering, SE-2(4): 308–320 — the cyclomatic ancestor. DOI · PDF.
  • Pirolli, P. & Card, S. (1999). Information Foraging. Psychological Review 106(4): 643–675 — basis for weighting external vs. relative vs. anchor edges. DOI.

See also