apple / ml-hypersim
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 110 units with 5,275 lines of code in units (39.7% of code).
    • 5 very complex units (2,051 lines of code)
    • 3 complex units (928 lines of code)
    • 11 medium complex units (833 lines of code)
    • 12 simple units (372 lines of code)
    • 79 very simple units (1,091 lines of code)
38% | 17% | 15% | 7% | 20%
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
cpp50% | 15% | 16% | 5% | 12%
py13% | 23% | 13% | 11% | 39%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
code/cpp/tools/scene_annotation_tool36% | 14% | 14% | 9% | 24%
code/cpp/tools/generate_camera_trajectory_random_walk100% | 0% | 0% | 0% | 0%
code/cpp/tools/generate_octomap100% | 0% | 0% | 0% | 0%
code/python/lib36% | 0% | 0% | 11% | 52%
code/python/analysis0% | 84% | 11% | 2% | <1%
code/cpp/tools/generate_hdf5_from_exr0% | 100% | 0% | 0% | 0%
code/cpp/tools/generate_oriented_bounding_box0% | 0% | 100% | 0% | 0%
code/cpp/tools/generate_ray_intersections0% | 0% | 100% | 0% | 0%
code/python/tools0% | 0% | 33% | 3% | 63%
code/cpp/tools/generate_octomap_samples0% | 0% | 100% | 0% | 0%
contrib/999910% | 0% | 36% | 0% | 63%
evermotion_dataset0% | 0% | 0% | 100% | 0%
code/python/plots0% | 0% | 0% | 86% | 13%
contrib/mikeroberts3000/jupyter0% | 0% | 0% | 86% | 13%
contrib/mikeroberts3000/python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void draw_custom_window()
in code/cpp/tools/scene_annotation_tool/main.cpp
427 114 0
int main()
in code/cpp/tools/generate_octomap/main.cpp
469 72 2
int main()
in code/cpp/tools/generate_camera_trajectory_random_walk/main.cpp
665 58 2
def load_obj_file()
in code/python/lib/obj_file_utils.py
213 55 1
bool mouse_up()
in code/cpp/tools/scene_annotation_tool/main.cpp
277 53 3
int main()
in code/cpp/tools/generate_hdf5_from_exr/main.cpp
272 49 2
def process_scene()
in code/python/analysis/dataset_generate_image_statistics.py
373 48 2
bool remove_vertices_and_faces()
in code/cpp/tools/scene_annotation_tool/main.cpp
283 40 3
bool mouse_move()
in code/cpp/tools/scene_annotation_tool/main.cpp
81 20 3
def get_strings_for_plugin()
in code/python/tools/generate_node_metadata_from_vrscene.py
62 20 1
int main()
in code/cpp/tools/generate_oriented_bounding_box/main.cpp
137 19 2
def download_files()
in contrib/99991/download.py
26 15 1
def process_scene()
in code/python/tools/dataset_generate_hdf5_from_vrimg.py
73 14 2
int main()
in code/cpp/tools/generate_octomap_samples/main.cpp
65 13 2
int main()
in code/cpp/tools/generate_ray_intersections/main.cpp
136 13 2
bool mouse_down()
in code/cpp/tools/scene_annotation_tool/main.cpp
52 13 3
bool key_pressed()
in code/cpp/tools/scene_annotation_tool/main.cpp
68 13 3
def process_scene()
in code/python/analysis/dataset_generate_scene_labeling_statistics.py
52 13 2
int main()
in code/cpp/tools/scene_annotation_tool/main.cpp
81 11 2
bool key_down()
in code/cpp/tools/scene_annotation_tool/main.cpp
29 10 3