public enum MatrixFormat extends Enum<MatrixFormat>
The various parts are specified by Boolean wrapper types; TRUE/FALSE value indicates unconditional in/exclusion, and a null value will include those cells only if there is something to plot in there.
Enum Constant and Description |
---|
FULL
Full matrix is occupied.
|
LOWER
Lower diagonal part of matrix is occupied.
|
UPPER
Upper diagonal part of matrix is occupied.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a user-directed description of this format.
|
MatrixShape |
getShape(int nw,
boolean hasOnDiag,
boolean hasOffDiag)
Returns a MatrixShape for a matrix of a given size conforming to
this MatrixFormat.
|
Boolean |
hasDiagonal()
Indicates whether to include the diagonal cells.
|
Boolean |
hasLower()
Indicates whether to include the lower triangular cells.
|
Boolean |
hasUpper()
Indicates whether to include the upper triangular cells.
|
static boolean |
isOffDiagonal(CoordGroup cgrp)
Indicates whether a given coordinate group represents a grid
element that would appear off the diagonal of a matrix plot.
|
static boolean |
isOnDiagonal(CoordGroup cgrp)
Indicates whether a given coordinate group represents a grid
element that would appear on the diagonal of a matrix plot.
|
static MatrixFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MatrixFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MatrixFormat LOWER
public static final MatrixFormat UPPER
public static final MatrixFormat FULL
public static MatrixFormat[] values()
for (MatrixFormat c : MatrixFormat.values()) System.out.println(c);
public static MatrixFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Boolean hasDiagonal()
public Boolean hasLower()
public Boolean hasUpper()
public String getDescription()
public MatrixShape getShape(int nw, boolean hasOnDiag, boolean hasOffDiag)
nw
- linear dimension of the matrixhasOnDiag
- whether on-diagonal cells are presenthasOffDiag
- whether off-diagonal cells are presentisOnDiagonal(uk.ac.starlink.ttools.plot2.data.CoordGroup)
,
isOffDiagonal(uk.ac.starlink.ttools.plot2.data.CoordGroup)
public static boolean isOnDiagonal(CoordGroup cgrp)
cgrp
- coord grouppublic static boolean isOffDiagonal(CoordGroup cgrp)
cgrp
- coord group, assumed to be the sort of coords
that might show up in a matrix plotCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.