class documentation

class Rotation(object):

View In Hierarchy

implement an orthogonal linear transformation for each dimension.

By default each Rotation instance provides a different "random" but fixed rotation. This class is used to implement non-separable test functions, most conveniently via Rotated.

Example:

>>> import cma, numpy as np
>>> R = cma.transformations.Rotation()
>>> R2 = cma.transformations.Rotation() # another rotation
>>> x = np.array((1,2,3))
>>> list(np.round(R(R(x), inverse=1), 9))
[1.0, 2.0, 3.0]
See Also
Rotated
Method __call__ Rotates the input array x with a fixed rotation matrix (self.dicMatrices[len(x)])
Method __init__ same seed means same rotation, by default a random but fixed once and for all rotation, different for each instance
Instance Variable dicMatrices Undocumented
Instance Variable seed Undocumented
Instance Variable state Undocumented
def __call__(self, x, inverse=False, **kwargs):

Rotates the input array x with a fixed rotation matrix (self.dicMatrices[len(x)])

def __init__(self, seed=None):

same seed means same rotation, by default a random but fixed once and for all rotation, different for each instance

dicMatrices: dict =

Undocumented

seed =

Undocumented

state =

Undocumented