from Wiktionary, Creative Commons Attribution/Share-Alike License
- adj. Used to describe the number of edges that must be removed from a graph to ensure that no graph cycle remains; equal to the number of edges, minus the number of nodes plus one.
- adj. Used to describe the number of circuits in a network; equal to the number of edges, minus the number of nodes plus the number of graphs.
from The Century Dictionary and Cyclopedia
- Of or pertaining to a cycle or cycles.
Sorry, no etymologies found.
Second, because no matter how much tests you have, cyclomatic complexity will always get you in the most inappropriate times.
The closest thing that I can think of that comes close to whatever “structural complexity of algorithms” means is cyclomatic complexity, which I never touched on.
In this tip we will start out with a simple example of cyclomatic complexity to understand the concept quickly then give some additional information on actual usage and suggested limits.
At a high level, we determine the value of cyclomatic complexity by counting the number of decisions made in our source code.
Essentially, with cyclomatic complexity, higher numbers are "bad" and lower numbers are "good".
We use cyclomatic complexity to get a sense of how hard any given code may be to test, maintain, or troubleshoot as well as an indication of how likely the code will be to produce errors.
Notice the cyclomatic complexity is at 2 the lowest value possible.
If I add a decision, the cyclomatic complexity value goes up by 1:
As with many metrics in our industry, there is no exact cyclomatic complexity limit that fits all organizations.
When working with code metrics, one of the least understood items seems to be cyclomatic complexity.
Wordnik is becoming a not-for-profit! Read our announcement here.