aws-samples / amazon-braket-community-detection
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 21 units with 277 lines of code in units (88.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 5 simple units (95 lines of code)
    • 16 very simple units (182 lines of code)
0% | 0% | 0% | 34% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 0% | 34% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 0% | 34% | 65%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def qubo_matrix_community_sparse()
in src/qubo_community.py
13 10 3
def draw_graph_community()
in src/graph_community.py
24 10 6
def qbsolv_response_to_community()
in src/qubo_community.py
20 9 3
def create_random_graph()
in src/graph_community.py
25 8 6
def load_node_labels()
in src/graph_community.py
13 7 3
def run_community_detection()
in src/qbsolv_community.py
36 5 2
def _save_results()
in src/qbsolv_community.py
15 5 4
def clean_graph_data()
in src/utils.py
11 5 2
def modularity_mx()
in src/qubo_community.py
10 5 1
def _solve_single_graph()
in src/qbsolv_community.py
12 3 1
def download_graphs()
in src/utils.py
9 3 2
def create_qubo_dict()
in src/qbsolv_community.py
9 2 3
def solve_hybrid()
in src/qbsolv_community.py
20 2 4
def draw_graph()
in src/graph_community.py
6 2 2
def __init__()
in src/qbsolv_community.py
7 1 7
def solve_classical()
in src/qbsolv_community.py
11 1 2
def qpu_cost_warning()
in src/qbsolv_community.py
7 1 1
def __init__()
in src/qbsolv_community.py
13 1 12
def __init__()
in src/graph_community.py
2 1 2
def _sort_nodes()
in src/graph_community.py
5 1 1