facebookresearch / DeepSDF
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 80 units with 1,698 lines of code in units (65.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (627 lines of code)
    • 8 simple units (410 lines of code)
    • 66 very simple units (661 lines of code)
0% | 0% | 36% | 24% | 38%
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
cpp0% | 0% | 43% | 38% | 18%
py0% | 0% | 30% | 8% | 61%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 42% | 37% | 19%
ROOT0% | 0% | 35% | 11% | 52%
networks0% | 0% | 68% | 0% | 31%
deep_sdf0% | 0% | 0% | 0% | 100%
deep_sdf/metrics0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main_function()
in train_deep_sdf.py
206 21 3
int main()
in src/PreprocessMesh.cpp
211 20 2
def forward()
in networks/deep_sdf_decoder.py
31 16 2
void writeSDFToPLY()
in src/PreprocessMesh.cpp
51 13 5
void SampleSDFNearSurface()
in src/PreprocessMesh.cpp
72 12 11
56 11 3
int main()
in src/SampleVisibleMeshSurface.cpp
130 10 2
42 9 2
void SampleFromSurfaceInside()
in src/SampleVisibleMeshSurface.cpp
63 9 7
void SampleFromSurface()
in src/PreprocessMesh.cpp
49 8 3
31 8 4
def load_logs()
in plot_log.py
46 7 2
def load_latent_vectors()
in train_deep_sdf.py
21 7 3
void writeSDFToNPZ()
in src/PreprocessMesh.cpp
28 6 4
def get_instance_filenames()
in deep_sdf/data.py
16 5 2
29 5 1
7 5 2
def evaluate()
in evaluate.py
58 5 4
def code_to_mesh()
in generate_training_meshes.py
61 5 3
def append_data_source_map()
in preprocess_data.py
16 4 3