facebookresearch / tacto
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 104 units with 1,185 lines of code in units (17.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (35 lines of code)
    • 6 simple units (236 lines of code)
    • 97 very simple units (914 lines of code)
0% | 0% | 2% | 19% | 77%
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% | 2% | 19% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
experiments/grasp_stability0% | 0% | 7% | 26% | 66%
tacto0% | 0% | 0% | 23% | 76%
experiments/rolling0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __getitem__()
in experiments/grasp_stability/train.py
35 11 2
def go()
in experiments/grasp_stability/robot.py
41 10 6
def load()
in experiments/grasp_stability/draw.py
22 9 3
def add_object()
in tacto/sensor.py
29 9 4
def __init__()
in tacto/renderer.py
30 9 5
def load_data()
in experiments/grasp_stability/train.py
68 7 3
def _init_light()
in tacto/renderer.py
46 6 1
def create_scene()
in experiments/rolling/RollingEnv.py
49 5 1
def train()
in experiments/grasp_stability/train.py
41 5 2
def get_control_id_by_name()
in experiments/grasp_stability/robot.py
14 5 2
def _generate_gel_trimesh()
in tacto/renderer.py
32 5 1
def step()
in experiments/rolling/RollingEnv.py
23 4 2
def get_forces()
in experiments/grasp_stability/grasp_data_collection.py
17 4 4
def __init__()
in experiments/grasp_stability/robot.py
35 4 2
def get_pose()
in tacto/sensor.py
11 4 1
def render()
in tacto/sensor.py
18 4 1
def _add_noise()
in tacto/renderer.py
9 4 2
def _f()
in experiments/rolling/Rolling.py
22 3 2
def simulate()
in experiments/rolling/RollingEnv.py
25 3 3
def __init__()
in experiments/grasp_stability/train.py
11 3 2