microsoft / O-CNN
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 1,313 units with 17,676 lines of code in units (56.7% of code).
    • 2 very complex units (496 lines of code)
    • 9 complex units (938 lines of code)
    • 49 medium complex units (2,670 lines of code)
    • 133 simple units (3,752 lines of code)
    • 1,120 very simple units (9,820 lines of code)
2% | 5% | 15% | 21% | 55%
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
cpp4% | 8% | 22% | 23% | 41%
cc0% | 5% | 15% | 2% | 76%
py0% | 0% | 2% | 22% | 74%
h0% | 0% | 0% | 24% | 75%
hpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
octree/tools18% | 4% | 15% | 37% | 24%
octree/octree4% | 14% | 26% | 20% | 33%
caffe/src0% | 5% | 13% | 24% | 56%
tensorflow/libs0% | 4% | 12% | 1% | 80%
caffe/tools0% | 0% | 32% | 32% | 35%
pytorch/cpp0% | 0% | 24% | 2% | 72%
caffe/experiments0% | 0% | 25% | 47% | 27%
pytorch/projects0% | 0% | 2% | 27% | 70%
tensorflow/script0% | 0% | 0% | 18% | 81%
tensorflow/data0% | 0% | 0% | 41% | 58%
pytorch/ocnn0% | 0% | 0% | 10% | 89%
tensorflow/util0% | 0% | 0% | 15% | 84%
caffe/include0% | 0% | 0% | 0% | 100%
pytorch0% | 0% | 0% | 0% | 100%
octree/python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void adaptive_octree()
in octree/tools/adaptive_octree.cpp
313 88 3
void Octree::calc_signal()
in octree/octree/octree.cpp
183 65 2
void Octree::extrapolate_signal()
in octree/octree/octree.cpp
124 42 0
void merge_octrees()
in caffe/src/caffe/util/octree.cpp
154 37 2
void Octree::calc_signal()
in octree/octree/octree.cpp
121 36 4
void octree_dropout()
in octree/octree/transform_octree.cpp
130 36 4
void Octree::trim_octree()
in octree/octree/octree.cpp
101 35 0
bool Contour::check_subdividion()
in octree/octree/contour.cpp
47 33 2
void ScanOctree::trim_octree()
in octree/octree/transform_octree.cpp
96 32 3
void Compute()
in tensorflow/libs/transform_points_op.cc
83 27 1
void prune_octree()
in octree/tools/octree_prune.cpp
82 26 2
void MergeOctrees::merge_octree()
in octree/octree/merge_octrees.cpp
68 25 0
int test()
in caffe/tools/caffe.cpp
130 24 0
Tensor octree_property_gpu()
in pytorch/cpp/octree_property.cpp
117 23 3
Tensor octree_property_cpu()
in pytorch/cpp/octree_property.cpp
117 23 3
int main()
in octree/tools/upgrade_octree.cpp
102 19 2
void OctreeBaseConvLayer::LayerSetUp()
in caffe/src/caffe/layers/octree_base_conv_layer.cpp
85 18 2
void OctreeBaseConvLayer::Reshape()
in caffe/src/caffe/layers/octree_base_conv_layer.cpp
65 18 2
void Contour::marching_cube()
in octree/octree/contour.cpp
57 18 2
void feature_pooling()
in caffe/tools/feature_pooling.cpp
59 17 4