facebookresearch / theseus
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 366 units with 1,957 lines of code in units (45.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (78 lines of code)
    • 4 simple units (89 lines of code)
    • 360 very simple units (1,790 lines of code)
0% | 0% | 3% | 4% | 91%
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% | 4% | 4% | 91%
cpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
theseus/core0% | 0% | 16% | 9% | 74%
theseus/embodied/collision0% | 0% | 0% | 19% | 80%
theseus/geometry0% | 0% | 0% | 2% | 97%
theseus/utils0% | 0% | 0% | 15% | 84%
theseus/optimizer0% | 0% | 0% | 0% | 100%
theseus/embodied/motionmodel0% | 0% | 0% | 0% | 100%
theseus/optimizer/nonlinear0% | 0% | 0% | 0% | 100%
theseus/optimizer/linear0% | 0% | 0% | 0% | 100%
theseus/extlib0% | 0% | 0% | 0% | 100%
theseus/embodied/measurements0% | 0% | 0% | 0% | 100%
theseus/optimizer/autograd0% | 0% | 0% | 0% | 100%
theseus/embodied/misc0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
theseus0% | 0% | 0% | 0% | 100%
theseus/embodied/kinematics0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def copy()
in theseus/core/objective.py
38 14 1
def update()
in theseus/core/objective.py
40 12 3
def update_data()
in theseus/embodied/collision/signed_distance_field.py
23 10 4
def add()
in theseus/core/objective.py
43 9 2
def _rotate_shape_check()
in theseus/geometry/so2.py
15 8 3
def gather_from_rows_cols()
in theseus/utils/utils.py
8 6 3
def jacobians()
in theseus/core/cost_function.py
17 5 1
def backward()
in theseus/optimizer/autograd/sparse_autograd.py
30 5 2
def _get_J_err_var_()
in theseus/embodied/motionmodel/quasi_static_pushing_planar.py
9 5 3
def random_sparse_binary_matrix()
in theseus/utils/sparse_matrix_utils.py
14 5 4
def _compute()
in theseus/utils/utils.py
20 5 1
std::vector CusolverLUSolver::factor()
in theseus/extlib/cusolver_lu_solver.cpp
29 4 1
def __init__()
in theseus/core/objective.py
13 4 2
def _register_vars_in_list()
in theseus/core/cost_function.py
9 4 2
def _compute_default_order()
in theseus/optimizer/variable_ordering.py
9 4 2
def forward_kinematics()
in theseus/embodied/kinematics/robot_model.py
9 4 2
def exp_map()
in theseus/geometry/se2.py
29 4 1
def erase()
in theseus/core/objective.py
24 3 2
def get_cost_function_name()
in theseus/core/objective.py
5 3 2
def _copy_impl()
in theseus/core/cost_function.py
9 3 2