Cyclomatic Complexity

From Maisqual Wiki

Jump to: navigation, search

Contents


Definition

Cyclomatic complexity number of the control graph of the function.

This number depends on the number of nodes of decision in the control graph with the formula:

v = 1 + (ni − 1)
NodesOfDecision

where:

ni is the number of edges departing from the node i.

When the control graph has exactly one exit node (without departing edge) and one entry node (without entering edge), the cyclomatic number is equal to: V(G) = en + 2


See also

Glossary:

Metrics:

Papers:

Personal tools