Machine learningSoftware Metrics
圈复杂度 (Cyclomatic Complexity, CC)
圈复杂度(Cyclomatic Complexity, CC)由 Thomas McCabe 于 1976 年提出,是一种量化指标,用于衡量函数控制流图中线性独立路径的数量。圈复杂度高的函数更难理解、测试和维护;McCabe 提倡将 10 作为可维护性的复杂度阈值。
阅读完整方法
仅限会员
登录使用免费账户登录即可阅读本节。
Method map
The neighbourhood of related methods — select a node to explore.
来源
- McCabe, T. J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308–320. DOI: 10.1109/TSE.1976.233837 ↗
- Campbell, G. H. (1986). Defining a good metric, a software testing perspective. ASQ Software Quality Conference. link ↗
- Nagy, C., & Kriebel, K. (2001). Achieving optimal complexity and reliability. SAMS Publishing. ISBN: 0672322285
如何引用本页
ScholarGate. (2026, June 3). Cyclomatic Complexity Metric. ScholarGate. https://scholargate.app/zh/numerical-methods/cyclomatic-complexity
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
Compare side by side →