google / jax-md
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 173 units with 3,363 lines of code in units (71.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (530 lines of code)
    • 17 simple units (696 lines of code)
    • 148 very simple units (2,137 lines of code)
0% | 0% | 15% | 20% | 63%
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% | 15% | 20% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
jax_md0% | 0% | 13% | 21% | 64%
jax_md/colab_tools0% | 0% | 66% | 0% | 33%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def render()
in jax_md/colab_tools/renderer.py
86 22 6
def cell_list()
in jax_md/partition.py
87 20 3
def neighbor_list()
in jax_md/partition.py
154 19 11
def pair()
in jax_md/smap.py
66 15 9
def periodic_general()
in jax_md/space.py
41 13 3
def pair_neighbor_list()
in jax_md/smap.py
52 12 8
def _unflatten_cell_buffer()
in jax_md/partition.py
14 11 3
30 11 4
71 10 6
68 10 10
def _shift_array()
in jax_md/partition.py
19 9 2
def canonicalize_mass()
in jax_md/quantity.py
17 9 2
14 9 2
def triplet()
in jax_md/smap.py
63 9 9
def athermal_moduli()
in jax_md/elasticity.py
60 8 6
17 8 2
def mandel_to_tensor()
in jax_md/elasticity.py
43 7 1
41 7 4
def npt_nose_hoover()
in jax_md/simulate.py
104 7 8
def tensor_to_mandel()
in jax_md/elasticity.py
20 6 1