Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

What is cyclomatic complexity?

2 like 0 dislike
Hello guys,

Anybody know What is cyclomatic complexity and why is it important?

Thanks in advance.........
asked 1 year ago by daneim (127,080 points)

1 Answer

1 like 0 dislike
 
Best answer
yclomatic complexity is a computer science metric (measurement) developed by Thomas McCabe used to generally measure the complexity of a program. It directly measures the number of linearly independent paths through a program’s source code.

The concept, although not the method, is somewhat similiar to that of general text complexity measured by the Flesch-Kincaid Readability Test.

Cyclomatic complexity is computed using a graph that describes the control flow of the program. The nodes of the graph correspond to the commands of a program. A directed edge connects two nodes, if the second command might be executed immediately after the first command. By definition,

CC = E - N + P

where
CC = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components.
answered 1 year ago by marck_don (191,010 points)

Related questions

10 like 1 dislike
1 answer
4 like 0 dislike
0 answers
7 like 0 dislike
2 answers
asked 2 years ago by pollard (41,990 points)
9 like 0 dislike
1 answer