facebookresearch / differentiable-robot-model
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 119 units with 1,151 lines of code in units (16.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (39 lines of code)
    • 2 simple units (52 lines of code)
    • 116 very simple units (1,060 lines of code)
0% | 0% | 3% | 4% | 92%
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% | 3% | 4% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
differentiable_robot_model0% | 0% | 3% | 4% | 92%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def tensor_check()
in differentiable_robot_model/robot_model.py
39 12 1
def __init__()
in differentiable_robot_model/robot_model.py
23 6 4
def iterative_newton_euler()
in differentiable_robot_model/robot_model.py
29 6 2
def __init__()
in differentiable_robot_model/spatial_vector_algebra.py
14 5 4
def get_quaternion()
in differentiable_robot_model/spatial_vector_algebra.py
28 5 1
def get_body_parameters_from_urdf()
in differentiable_robot_model/urdf_utils.py
91 5 3
def generate_random_inverse_dynamics_data()
in differentiable_robot_model/data_utils.py
37 4 2
def update_kinematic_state()
in differentiable_robot_model/robot_model.py
27 4 3
def update_joint_state()
in differentiable_robot_model/rigid_body.py
20 3 3
def generate_random_forward_kinematics_data()
in differentiable_robot_model/data_utils.py
16 3 3
def convertAxisAngleToQuaternion()
in differentiable_robot_model/se3_so3_util.py
16 3 2
def convertQuaternionToAxisAngle()
in differentiable_robot_model/se3_so3_util.py
10 3 3
def getSkewSymMatFromVec3()
in differentiable_robot_model/se3_so3_util.py
10 3 1
def getVec3FromSkewSymMat()
in differentiable_robot_model/se3_so3_util.py
15 3 2
def logMapSO3()
in differentiable_robot_model/se3_so3_util.py
16 3 2
def convert_into_pytorch_tensor()
in differentiable_robot_model/utils.py
7 3 1
def find_joint_of_body()
in differentiable_robot_model/urdf_utils.py
5 3 2
def _get_parent_object_of_param()
in differentiable_robot_model/robot_model.py
12 3 3
def __init__()
in differentiable_robot_model/rigid_body_params.py
6 2 2
def __init__()
in differentiable_robot_model/rigid_body_params.py
7 2 5