Package xal.tools.math.r3
Enum Class R3x3.POS
- All Implemented Interfaces:
Serializable
,Comparable<R3x3.POS>
,Constable
- Enclosing class:
- R3x3
Enumeration for the element positions of an
R3x3
matrix
element. Also provides some convenience functions for accessing these
R3x3
elements.- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionint
col()
return the column index of the matrix positiondouble
getColDiag
(R3x3 matTarget) Get the diagonal element in the same column as this element position.Return the set of all matrix element positions along the diagonal.Return the set of all element positions below the matrix diagonal.Return the set of all off-diagonal matrix positions.double
getRowDiag
(R3x3 matTarget) Get the diagonal element in the same row as this element position.Returns the set of all element positions above the matrix diagonal.double
Return the matrix element value for this positionint
row()
return the row index of the matrix positionvoid
setColDiag
(R3x3 matTarget, double s) Set the diagonal element in the same column as this element position.void
setRowDiag
(R3x3 matTarget, double s) Set the diagonal element in the same row as this element position.void
Set matrix element value for this positionReturn thePosition
object representing the transpose element of this position.static R3x3.POS
Returns the enum constant of this class with the specified name.static R3x3.POS[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
XY
-
XZ
-
YZ
-
XX
-
YY
-
ZZ
-
YX
-
ZX
-
ZY
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
row
public int row()return the row index of the matrix position -
col
public int col()return the column index of the matrix position -
transpose
Return thePosition
object representing the transpose element of this position. NOTE: The current implementation is slow.- Returns:
- the transpose position of the current position
-
getUpperTriangle
Returns the set of all element positions above the matrix diagonal.- Returns:
- set of upper triangle matrix positions
-
getDiagonal
Return the set of all matrix element positions along the diagonal.- Returns:
- set of diagonal element positions
-
getLowerTriangle
Return the set of all element positions below the matrix diagonal.- Returns:
- set of lower triangle matrix positions
-
getOffDiagonal
Return the set of all off-diagonal matrix positions.- Returns:
- set of off diagonal positions, both upper and lower.
-
getValue
Return the matrix element value for this position- Parameters:
matTarget
- target matrix- Returns:
- element value for this position
-
getRowDiag
Get the diagonal element in the same row as this element position.- Parameters:
matTarget
- target matrix- Returns:
- row diagonal element value
-
getColDiag
Get the diagonal element in the same column as this element position.- Parameters:
matTarget
- target matrix- Returns:
- column diagonal element value
-
setValue
Set matrix element value for this position- Parameters:
matTarget
- target matrixs
- new value for matrix element
-
setRowDiag
Set the diagonal element in the same row as this element position.- Parameters:
matTarget
- target matrixs
- new value for matrix element
-
setColDiag
Set the diagonal element in the same column as this element position.- Parameters:
matTarget
- target matrixs
- new value for matrix element
-