weldx.WXRotation.reduce¶
- WXRotation.reduce()¶
Reduce this rotation with the provided rotation groups.
Reduction of a rotation
p
is a transformation of the formq = l * p * r
, wherel
andr
are chosen fromleft
andright
respectively, such that rotationq
has the smallest magnitude.If
left
andright
are rotation groups representing symmetries of two objects rotated byp
, thenq
is the rotation of the smallest magnitude to align these objects considering their symmetries.- Parameters
left (
Rotation
instance, optional) – Object containing the left rotation(s). Default value (None) corresponds to the identity rotation.right (
Rotation
instance, optional) – Object containing the right rotation(s). Default value (None) corresponds to the identity rotation.return_indices (bool, optional) – Whether to return the indices of the rotations from
left
andright
used for reduction.
- Returns
reduced (
Rotation
instance) – Object containing reduced rotations.left_best, right_best (integer ndarray) – Indices of elements from
left
andright
used for reduction.