Enum Class UPLO
- All Implemented Interfaces:
Serializable, Comparable<UPLO>, Constable
Which triangular part of a symmetric or triangular matrix is stored.
When a matrix is symmetric, Hermitian, or triangular, only one triangular half needs to be stored. BLAS and LAPACK use this flag to indicate which half is present in memory:
UPPER— only the upper triangular part (including the diagonal) is stored.LOWER— only the lower triangular part (including the diagonal) is stored.
Use flip(UPLO) to convert between the two, which is required when
switching between row-major and column-major layouts (the upper triangle of a
row-major matrix corresponds to the lower triangle in column-major layout).
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintblas()Returns the integer value for CBLAS.Returns a human-readable description of this storage flag.static UPLOstatic UPLOfromBlas(int value) Returns theUPLOconstant corresponding to the given CBLAS integer value.static UPLOfromLapack(byte value) Returns theUPLOconstant corresponding to the given LAPACK byte value.booleanisLower()Returnstrueif the lower triangle is stored.booleanisUpper()Returnstrueif the upper triangle is stored.bytelapack()Returns the byte value for LAPACK.static UPLOReturns the enum constant of this class with the specified name.static UPLO[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UPPER
Upper triangular part is stored (including diagonal). The lower triangle is inferred by symmetry and need not be present in memory. -
LOWER
Lower triangular part is stored (including diagonal). The upper triangle is inferred by symmetry and need not be present in memory.
-
-
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.
-
isUpper
public boolean isUpper()Returnstrueif the upper triangle is stored.- Returns:
trueif upper.
-
isLower
public boolean isLower()Returnstrueif the lower triangle is stored.- Returns:
trueif lower.
-
description
Returns a human-readable description of this storage flag.- Returns:
- a human-readable description.
-
flip
Flips betweenUPPERandLOWER, null-safe.This is useful when switching between row-major and column-major representations: the upper triangle of a row-major matrix corresponds to the lower triangle when the same data is interpreted in column-major.
- Parameters:
value- anUPLOvalue, may benull.- Returns:
- the flipped value, or
nullif the input isnull.
-
fromBlas
Returns theUPLOconstant corresponding to the given CBLAS integer value.- Parameters:
value- the CBLAS integer value (121for upper,122for lower).- Returns:
- the matching
UPLOconstant. - Throws:
IllegalArgumentException- if the value does not match any constant.
-
fromLapack
Returns theUPLOconstant corresponding to the given LAPACK byte value.- Parameters:
value- the LAPACK byte value ('U'or'L').- Returns:
- the matching
UPLOconstant. - Throws:
IllegalArgumentException- if the value does not match any constant.
-