facebookresearch / differentiable-robot-model
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 119 units with 1,151 lines of code in units (16.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (91 lines of code)
    • 13 medium size units (376 lines of code)
    • 19 small units (264 lines of code)
    • 86 very small units (420 lines of code)
0% | 7% | 32% | 22% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 7% | 32% | 22% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
differentiable_robot_model0% | 7% | 32% | 22% | 36%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def get_body_parameters_from_urdf()
in differentiable_robot_model/urdf_utils.py
91 5 3
def tensor_check()
in differentiable_robot_model/robot_model.py
39 12 1
def generate_random_inverse_dynamics_data()
in differentiable_robot_model/data_utils.py
37 4 2
def get_spatial_mat()
in differentiable_robot_model/spatial_vector_algebra.py
31 1 1
def generate_sine_motion_inverse_dynamics_data()
in differentiable_robot_model/data_utils.py
30 1 4
def generate_sine_motion_forward_dynamics_data()
in differentiable_robot_model/data_utils.py
30 1 4
def iterative_newton_euler()
in differentiable_robot_model/robot_model.py
29 6 2
def get_quaternion()
in differentiable_robot_model/spatial_vector_algebra.py
28 5 1
def logMapSE3()
in differentiable_robot_model/se3_so3_util.py
28 1 2
def __init__()
in differentiable_robot_model/rigid_body.py
27 2 3
def update_kinematic_state()
in differentiable_robot_model/robot_model.py
27 4 3
def forward()
in differentiable_robot_model/rigid_body_params.py
26 1 1
def __init__()
in differentiable_robot_model/robot_model.py
23 6 4
def expMapse3()
in differentiable_robot_model/se3_so3_util.py
21 1 2
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 logMapSO3()
in differentiable_robot_model/se3_so3_util.py
16 3 2
def multiply_motion_vec()
in differentiable_robot_model/spatial_vector_algebra.py
15 1 2
def getVec3FromSkewSymMat()
in differentiable_robot_model/se3_so3_util.py
15 3 2