Cyclomatic Complexity
Essential complexity is also used with a different meaning in connection with cyclomatic complexity. In this context, essential complexity refers to the cyclomatic complexity after iteratively replacing all well structured control structures with a single statement. Structures such as if-then-else and while loops are considered well structured and then do not increase the essential cyclomatic complexity. Unconstrained use of goto, break and continue statements can produce programs which can not be reduced in this way.
For example, the following C program fragment has an essential complexity of 1, because the inner if statement and the for can be reduced:
for(i=0;i<3;i++) { if(a == 0) b += 2; }The following C program fragment has an essential complexity of more than one. It finds the first row of z which is all zero and puts that index in i; if there is none, it puts -1 in i.
for(i=0;iRead more about this topic: Essential Complexity
Famous quotes containing the word complexity:
“It is not only their own need to mother that takes some women by surprise; there is also the shock of discovering the complexity of alternative child-care arrangements that have been made to sound so simple. Those for whom the intended solution is equal parenting have found that some parents are more equal than others.”
—Elaine Heffner (20th century)