ScholarGate
助手
Machine learningSoftware Metrics

圈复杂度 (Cyclomatic Complexity, CC)

圈复杂度(Cyclomatic Complexity, CC)由 Thomas McCabe 于 1976 年提出,是一种量化指标,用于衡量函数控制流图中线性独立路径的数量。圈复杂度高的函数更难理解、测试和维护;McCabe 提倡将 10 作为可维护性的复杂度阈值。

在 MethodMind 中打开即将推出视频即将推出Download slides

阅读完整方法

仅限会员

使用免费账户登录即可阅读本节。

登录

Method map

The neighbourhood of related methods — select a node to explore.

圈复杂度 (Cyclomatic Complexity, CC)
Halstead ComplexityCK度量

来源

  1. McCabe, T. J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308–320. DOI: 10.1109/TSE.1976.233837
  2. Campbell, G. H. (1986). Defining a good metric, a software testing perspective. ASQ Software Quality Conference. link
  3. 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

被引用于

ScholarGateCyclomatic Complexity (Cyclomatic Complexity Metric). 于 2026-06-15 检索自 https://scholargate.app/zh/numerical-methods/cyclomatic-complexity · 数据集: https://doi.org/10.5281/zenodo.20539026