{"id":1108,"date":"2020-02-07T16:54:09","date_gmt":"2020-02-07T03:54:09","guid":{"rendered":"https:\/\/www.ronella.xyz\/?p=1108"},"modified":"2020-02-07T18:08:07","modified_gmt":"2020-02-07T05:08:07","slug":"cyclomatic-complexity","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=1108","title":{"rendered":"Cyclomatic Complexity"},"content":{"rendered":"<p>Cyclomatic complexity is the count of linearly independent paths in a program's source code. With the help of control flow graph, we can use the following formula to calculate this:<\/p>\n<p style=\"text-align: center; font-size: xxx-large;\"><strong>CC = E - N + 2P<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Variable<\/strong><\/td>\n<td style=\"text-align: left;\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td>E<\/td>\n<td>The number of edges in the control flow graph.<\/td>\n<\/tr>\n<tr>\n<td>N<\/td>\n<td>The number of nodes in the control flow graph.<\/td>\n<\/tr>\n<tr>\n<td>P<\/td>\n<td>The number of connected components. This has a value of <strong>1<\/strong> if you are computing at the method <em>(i.e. function or subroutine)<\/em> level.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em><strong>Related<\/strong><\/em><br \/>\n<em><a href=\"https:\/\/www.ronella.xyz\/?p=1105\" target=\"_blank\" rel=\"noopener noreferrer\">Control Flow Graph<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cyclomatic complexity is the count of linearly independent paths in a program&#8217;s source code. With the help of control flow graph, we can use the following formula to calculate this: CC = E &#8211; N + 2P Variable Description E The number of edges in the control flow graph. N The number of nodes in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1108"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1108"}],"version-history":[{"count":5,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1108\/revisions"}],"predecessor-version":[{"id":1114,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1108\/revisions\/1114"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}