If you diagram the method shown in Listing 11 into a flow chart, you can easily count the number of edges and nodes and calculate the cyclomatic complexity, as shown in Figure 1.
如果把清单11所示的方法画成流程图(见图 1),就很容易算出边数和节点数并计算出圈复杂度。
Some of the common questions relating to cyclomatic complexity are "How does my code compare to others?" and "What is a good number for a particular class?"
与圈复杂度相关的常见问题包括 “我的代码与别人的代码相比怎么样?”和 “对于一个类,多大的数值是合适的?”
The cyclomatic complexity formula, first developed by Thomas McCabe, is based on the number of branches in a function.
圈复杂性公式(cyclomatic complexity formula),被Thomas McCabe首先提出,它是基于一个函数的分支数量来确定复杂度的。
The cyclomatic complexity formula, first developed by Thomas McCabe, is based on the number of branches in a function.
圈复杂性公式(cyclomatic complexity formula),被Thomas McCabe首先提出,它是基于一个函数的分支数量来确定复杂度的。
应用推荐