next up previous contents
Next: Viewing node neighborhood and Up: Viewing Reports Previous: Reporting numbers of nodes

Reporting cyclomatic complexity

 

The McCabe cyclomatic complexity V(G) of a control flow graph measures the maximum number of linearly independent paths through it. The complexity typically increases because of branch points.

To compute the cyclomatic complexity:

If e is the number of arcs, n is the number of nodes, and p is the number of connected components, then V(G) = e - n + 2p.



James Uhl
Wed Jul 10 14:13:22 PDT 1996