Machine learningSoftware Metrics

ความซับซ้อนเชิงวัฏจักร

ความซับซ้อนเชิงวัฏจักร (Cyclomatic Complexity, CC) ซึ่ง Thomas McCabe นำเสนอในปี 1976 เป็นตัวชี้วัดเชิงปริมาณที่วัดจำนวนเส้นทางอิสระเชิงเส้นผ่านกราฟการควบคุมการทำงาน (control-flow graph) ของฟังก์ชัน ฟังก์ชันที่มีความซับซ้อนเชิงวัฏจักรสูงจะเข้าใจ ทดสอบ และบำรุงรักษาได้ยากกว่า McCabe แนะนำให้ใช้ค่าขีดจำกัดที่ 10 เป็นเกณฑ์ความซับซ้อนสำหรับการบำรุงรักษา

เปิดใน MethodMindเร็ว ๆ นี้วิดีโอเร็ว ๆ นี้Download slides

อ่านวิธีฉบับเต็ม

สำหรับสมาชิกเท่านั้น

เข้าสู่ระบบด้วยบัญชีฟรีเพื่ออ่านส่วนนี้

เข้าสู่ระบบ

Method map

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

ความซับซ้อนเชิงวัฏจักร
Halstead ComplexityCK Metrics

แหล่งอ้างอิง

  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/th/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/th/numerical-methods/cyclomatic-complexity · ชุดข้อมูล: https://doi.org/10.5281/zenodo.20539026