pypose.cummul¶
- class pypose.cummul(input, dim, left=True)[source]¶
Returns the cumulative multiplication (*) of LieTensor along a dimension.
Left multiplication:
\[y_i = x_i * x_{i-1} * \cdots * x_1, \]Right multiplication:
\[y_i = x_1 * x_2 * \cdots * x_i, \]where \(x_i,~y_i\) are the \(i\)-th LieType item along the
dim
dimension of input and output, respectively.- Parameters
- Returns
The LieTensor
- Return type
Note
The time complexity of the function is \(\mathcal{O}(\log N)\), where \(N\) is the LieTensor size along the
dim
dimension.
Example
Left multiplication with \(\text{input} \in\)
SE3
>>> input = pp.randn_SE3(2) >>> pp.cummul(input, dim=0) SE3Type LieTensor: tensor([[-1.9615, -0.1246, 0.3666, 0.0165, 0.2853, 0.3126, 0.9059], [ 0.7139, 1.3988, -0.1909, -0.1780, 0.4405, -0.6571, 0.5852]])
Left multiplication with \(\text{input} \in\)
SO3
>>> input = pp.randn_SO3(1,2) >>> pp.cummul(input, dim=1, left=False) SO3Type LieTensor: tensor([[[-1.8252e-01, 1.6198e-01, 8.3683e-01, 4.9007e-01], [ 2.0905e-04, 5.2031e-01, 8.4301e-01, -1.3642e-01]]])