查找功能的复杂性指数 [英] Finding the function complexity index

查看:123
本文介绍了查找功能的复杂性指数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须找到一个C文件的基础上的行数的复杂性。我已经发现的行数。但如何判断它是否是一个复杂的文件或没有?基于一定的价值,我必须给它一个索引。对于例如,复杂性指数 - 高复杂度5。在此基础上我可以索引呢?超过1000线的高复杂,例如,将无法适用于所有。有没有给条件('1000多行)的标准方法是什么?任何一种建议是值得欢迎的,但任何pre定义的工具。我需要它C.在此先感谢编程。

I have to find the complexity of a C file based on the number of lines. I have found the number of lines. But how to decide whether it is a complex file or not? Based on certain value, I have to give it an index. For eg., complexity index - 5 for high complexity. On which basis can I index it? More than 1000 lines for high complex, for eg., won't apply for all. Is there any standard way for giving conditions('more than 1000 lines')? Any kind of suggestions are welcome, except any pre-defined tools. I need to program it in C. Thanks in advance.

推荐答案

comlexity不是基于线,例如:

comlexity is not based on lines, for example:

而(N!= 0){A + = B; N - ;}

复杂是正
另有exapmle:

the complex is n and another exapmle:

for(i=0;i<n;i++) {for(j=0;j<n;j++) {a+=b} }

复杂性为n ^ 2

the complexity is n^2

这篇关于查找功能的复杂性指数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆