facebookresearch / ContactOpt
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 91 units with 1,215 lines of code in units (4.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (171 lines of code)
    • 5 simple units (101 lines of code)
    • 83 very simple units (943 lines of code)
0% | 0% | 14% | 8% | 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% | 14% | 8% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
contactopt0% | 0% | 14% | 8% | 77%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def show_optimization()
in contactopt/visualize.py
61 20 8
def run_contactopt()
in contactopt/run_contactopt.py
82 16 1
def run_eval()
in contactopt/run_eval.py
28 13 1
def collate_fn()
in contactopt/loader.py
16 10 1
def generate_contactpose_dataset()
in contactopt/create_dataset_contactpose.py
35 10 8
def sdf_to_contact()
in contactopt/diffcontact.py
15 8 3
def to_cpu_numpy()
in contactopt/util.py
15 6 1
def load_from_contactpose()
in contactopt/hand_object.py
20 6 2
def parse_dataset()
in contactopt/arguments.py
12 5 1
def __init__()
in contactopt/loader.py
12 5 4
def get_all_contactpose_samples()
in contactopt/create_dataset_contactpose.py
12 5 0
def load_from_image()
in contactopt/hand_object.py
17 5 6
def calc_dist_contact()
in contactopt/hand_object.py
15 5 4
def get_o3d_meshes()
in contactopt/hand_object.py
23 5 3
def calc_mean_dicts()
in contactopt/run_eval.py
12 4 2
def vis_pointcloud()
in contactopt/util.py
20 4 4
def train_network_parse_args()
in contactopt/arguments.py
22 4 0
def vis_sample()
in contactopt/run_eval.py
18 3 5
def forward_mano()
in contactopt/util.py
12 3 4
def apply_rot()
in contactopt/util.py
8 3 3