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.
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- Faster loop: foreach vs some (performance of jsper
- glDrawElements only draws half a quad
- Why wrapping a function into a lambda potentially
comlexity is not based on lines, for example:
while(n!=0) {a+=b;n--;}
the complex is n and another exapmle:
the complexity is n^2