public class RotationMatrixBuilder
extends java.lang.Object
new RotationMatrixBuilder(3).rotatePlane(0,1).withTheta(Math.PI/4) .rotatePlane(1,2).withTheta(Math.PI/8).create()
new RotationMatrixBuilder(3).rotatePlane(0,1).rotatePlane(1,2) .withRandomThetas().create()
new RotationMatrixBuilder(3).rotateK(2).create()
References:
Constructor and Description |
---|
RotationMatrixBuilder(int dimension)
Constructs a rotation matrix builder for the given dimension.
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.math3.linear.RealMatrix |
create()
Returns the rotation matrix resulting from applying all 2D rotation
planes and angles added to this builder.
|
RotationMatrixBuilder |
rotateAll()
Rotates all 2D rotation planes and assigns each a random rotation angle.
|
RotationMatrixBuilder |
rotateK(int k)
Rotates
k randomly-selected but unique 2D rotation planes and
assigns each a random rotation angle. |
RotationMatrixBuilder |
rotatePlane(int i,
int j)
Adds a rotation around the 2D rotation plane defined by the two axes.
|
RotationMatrixBuilder |
withRandomThetas()
Assigns random rotation angles to all 2D rotation planes added to this
builder.
|
RotationMatrixBuilder |
withTheta(double theta)
Sets the rotation angle, in radians, of the last 2D rotation plane
added to this builder.
|
RotationMatrixBuilder |
withThetas(double theta)
Sets the rotation angle, in radians, of all 2D rotation planes added to
this builder.
|
public RotationMatrixBuilder(int dimension)
dimension
- the dimension of rotation matrices produced by
this builderpublic RotationMatrixBuilder rotatePlane(int i, int j)
withTheta(double)
.i
- the first axisj
- the second axispublic RotationMatrixBuilder withTheta(double theta)
rotatePlane(int, int)
.theta
- the rotation angle in radianspublic RotationMatrixBuilder withThetas(double theta)
theta
- the rotation angle in radianspublic RotationMatrixBuilder withRandomThetas()
public RotationMatrixBuilder rotateAll()
public RotationMatrixBuilder rotateK(int k)
k
randomly-selected but unique 2D rotation planes and
assigns each a random rotation angle. For an N
-dimension
rotation matrix, there exist (N choose 2)
2D rotation planes.k
- the number of randomly-selected 2D rotation planespublic org.apache.commons.math3.linear.RealMatrix create()
Copyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.