Enum Class Transpose
- All Implemented Interfaces:
Serializable, Comparable<Transpose>, Constable
Matrix transpose operation passed to BLAS/LAPACK routines.
NO_TRANSPOSE— use the matrix as-is.TRANSPOSE— use the (real) transpose AT.CONJUGATE_TRANSPOSE— use the conjugate transpose AH (same as transpose for real matrices).
Use flip(Transpose) to toggle between NO_TRANSPOSE and
TRANSPOSE, which is needed when converting between row-major and
column-major representations.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConjugate-transpose the matrix: A becomes AH.Normal (identity) operation on the matrix.Transpose the matrix: A becomes AT. -
Method Summary
Modifier and TypeMethodDescriptionintblas()Returns the integer value for CBLAS.Returns a human-readable description of this transpose option.static TransposeToggles betweenNO_TRANSPOSEandTRANSPOSE, null-safe.static TransposefromBlas(int value) Returns theTransposeconstant corresponding to the given CBLAS integer value.static TransposefromLapack(byte value) Returns theTransposeconstant corresponding to the given LAPACK byte value.bytelapack()Returns the byte value for LAPACK.static TransposeReturns the enum constant of this class with the specified name.static Transpose[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_TRANSPOSE
Normal (identity) operation on the matrix. -
TRANSPOSE
Transpose the matrix: A becomes AT. -
CONJUGATE_TRANSPOSE
Conjugate-transpose the matrix: A becomes AH.
-
-
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
-
blas
public int blas()Returns the integer value for CBLAS.- Returns:
- the CBLAS integer value.
-
lapack
public byte lapack()Returns the byte value for LAPACK.- Returns:
- the LAPACK byte value.
-
description
Returns a human-readable description of this transpose option.- Returns:
- a human-readable description.
-
flip
Toggles betweenNO_TRANSPOSEandTRANSPOSE, null-safe.CONJUGATE_TRANSPOSEis treated the same asTRANSPOSEfor the purpose of flipping (returnsNO_TRANSPOSE).This is useful when switching between row-major and column-major matrix representations: a row-major
Apassed to a column-major BLAS call requires flipping the transpose flag.- Parameters:
value- aTransposevalue, may benull.- Returns:
- the flipped value, or
nullif the input isnull.
-
fromBlas
Returns theTransposeconstant corresponding to the given CBLAS integer value.- Parameters:
value- the CBLAS integer value (111,112, or113).- Returns:
- the matching
Transposeconstant. - Throws:
IllegalArgumentException- if the value does not match any constant.
-
fromLapack
Returns theTransposeconstant corresponding to the given LAPACK byte value.- Parameters:
value- the LAPACK byte value ('N','T', or'C').- Returns:
- the matching
Transposeconstant. - Throws:
IllegalArgumentException- if the value does not match any constant.
-