mindsponge.common.rots_mul_vecs

View Source On Gitee
mindsponge.common.rots_mul_vecs(m, v)[source]

Apply rotations m=(m0,m1,m2,m3,m4,m5,m6,m7,m8) to vectors v=(v0,v1,v2).

out=mvT=(m0×v0+m1×v1+m2×v2,m3×v0+m4×v1+m5×v2,m6×v0+m7×v1+m8×v2)
Parameters
  • m (tuple) – rotations m , length is 9. Data type is constant or Tensor with same shape.

  • v (tuple) – vectors v , length is 3. Data type is constant or Tensor with same shape.

Returns

tuple, vectors after rotations.

Supported Platforms:

Ascend GPU

Examples

>>> import mindsponge
>>> m = (1, 2, 3, 4, 5, 6, 7, 8, 9)
>>> v = (1, 2, 3)
>>> v1 = mindsponge.common.rots_mul_vecs(m, v)
>>> print(v1)
(14, 32, 50)