tensorflow / moonlight
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 311 units with 3,285 lines of code in units (71.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (326 lines of code)
    • 32 simple units (765 lines of code)
    • 271 very simple units (2,194 lines of code)
0% | 0% | 9% | 23% | 66%
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% | 10% | 24% | 65%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
moonlight/glyphs0% | 0% | 14% | 33% | 51%
moonlight/structure0% | 0% | 16% | 26% | 56%
moonlight/training0% | 0% | 12% | 1% | 85%
moonlight/conversions0% | 0% | 31% | 5% | 62%
moonlight/vision0% | 0% | 35% | 0% | 64%
moonlight/staves0% | 0% | 4% | 23% | 72%
moonlight/evaluation0% | 0% | 11% | 39% | 49%
moonlight/util0% | 0% | 0% | 56% | 43%
moonlight/score0% | 0% | 0% | 25% | 74%
moonlight0% | 0% | 0% | 28% | 71%
moonlight/models0% | 0% | 0% | 12% | 87%
moonlight/tools0% | 0% | 0% | 0% | 100%
moonlight/pipeline0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def score_to_musicxml()
in moonlight/conversions/musicxml.py
37 16 1
def _assign_barlines()
in moonlight/structure/barlines.py
33 16 2
def hough_peaks()
in moonlight/vision/hough.py
28 14 4
def compute()
in moonlight/structure/__init__.py
41 14 3
def _build_attributes()
in moonlight/evaluation/musicxml.py
23 13 3
def process()
in moonlight/training/generation/generation.py
65 12 2
def staff_center_filter()
in moonlight/staves/filter.py
24 11 4
def __init__()
in moonlight/glyphs/saved_classifier.py
75 11 6
def apply()
in moonlight/staves/staff_processor.py
25 10 2
def _build_detected_glyphs()
in moonlight/glyphs/convolutional.py
22 10 2
def apply()
in moonlight/glyphs/repeated.py
14 9 2
def __init__()
in moonlight/glyphs/neural.py
31 9 8
def peaks()
in moonlight/util/segments.py
43 9 4
def vertical_run_length_encoding()
in moonlight/util/run_length.py
19 9 1
def true_segments_1d()
in moonlight/util/segments.py
43 8 5
def musicxml_similarity()
in moonlight/evaluation/musicxml.py
31 8 2
def apply()
in moonlight/structure/beam_processor.py
22 8 2
def apply()
in moonlight/structure/stems.py
32 8 2
def _extract_staffline()
in moonlight/staves/staffline_extractor.py
26 7 4
def main()
in moonlight/omr.py
28 7 1