---
name: "Analizo::Metric::AverageCycloComplexity"
section: "3pm"
platform: "linux"
package: "analizo"
version: "1.25.5-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Analizo::Metric::AverageCycloComplexity"
---

# Analizo::Metric::AverageCycloComplexity(3pm)

Average Cyclomatic Complexity per Method (ACCM) metric

## NAME

Analizo::Metric::AverageCycloComplexity - Average Cyclomatic Complexity per Method (ACCM) metric

## DESCRIPTION

The metric calculation is based on the following article and calculates the cyclomatic complexity of the program.

Article: *McCabe, Thomas J. "A complexity measure." IEEE Transactions on software Engineering 4 (1976): 308-320*.

The Average Cyclomatic Complexity per Method is calculated counting the predicates (i.e., decision points, or conditional paths) on each method plus one, then a mean of all methods is returned as the final value of ACCM.

The cyclomatic complexity of a program represented as a graph can be calculated using a formula of graph theory:

```
  v(G) = e - n + 2
```

Where `"e"` is the number of edges and `"n"` is the number of nodes of the graph.

Another good reference is: *Woodward, Martin R., Michael A. Hennell, and David Hedley. "A measure of control flow complexity in program text." IEEE Transactions on Software Engineering 1 (1979): 45-50*.
