Enum Class Order
- All Implemented Interfaces:
Serializable, Comparable<Order>, Constable
Matrix memory layout (storage order).
BLAS and LAPACK support two storage orders:
ROW_MAJOR— elements of the same row are contiguous in memory (C / C++ convention, CBLAS value101).COL_MAJOR— elements of the same column are contiguous in memory (Fortran convention, CBLAS value102).
SMILE's DenseMatrix64 and DenseMatrix32 use column-major order
by default (matching Fortran LAPACK conventions).
-
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 order.static OrderfromValue(int value) Returns theOrderconstant corresponding to the given CBLAS/LAPACK integer value.booleanReturnstrueif this layout is column-major.booleanReturnstrueif this layout is row-major.intlapack()Returns the integer value for LAPACK (same encoding as CBLAS).static OrderReturns the enum constant of this class with the specified name.static Order[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROW_MAJOR
Row-major layout (C order): rows are contiguous. -
COL_MAJOR
Column-major layout (Fortran order): columns are contiguous.
-
-
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 int lapack()Returns the integer value for LAPACK (same encoding as CBLAS).- Returns:
- the LAPACK integer value.
-
isRowMajor
public boolean isRowMajor()Returnstrueif this layout is row-major.- Returns:
trueif row-major.
-
isColMajor
public boolean isColMajor()Returnstrueif this layout is column-major.- Returns:
trueif column-major.
-
description
Returns a human-readable description of this storage order.- Returns:
- a human-readable description.
-
fromValue
Returns theOrderconstant corresponding to the given CBLAS/LAPACK integer value.- Parameters:
value- the integer value (101for row-major,102for column-major).- Returns:
- the matching
Orderconstant. - Throws:
IllegalArgumentException- if the value does not match any constant.
-