class documentation
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)) >>> np.round(R(R(x), inverse=1), 9).tolist() [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 | dic |
Undocumented |
Instance Variable | seed |
Undocumented |
Instance Variable | state |
Undocumented |