Package org.apache.sysds.api.mlcontext
Enum MatrixFormat
- java.lang.Object
-
- java.lang.Enum<MatrixFormat>
-
- org.apache.sysds.api.mlcontext.MatrixFormat
-
- All Implemented Interfaces:
Serializable,Comparable<MatrixFormat>
public enum MatrixFormat extends Enum<MatrixFormat>
MatrixFormat represents the different matrix formats supported by the MLContext API.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CSVComma-separated value format (dense).DF_DOUBLESDataFrame of doubles with no row index.DF_DOUBLES_WITH_INDEXDataFrame of doubles with a row index.DF_VECTORVector DataFrame with no row index.DF_VECTOR_WITH_INDEXVector DataFrame with a row index.IJV(I J V) format (sparse).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasIDColumn()Does the DataFrame have a row index?booleanisVectorBased()Is the matrix format vector-based?static MatrixFormatvalueOf(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.
-
-
-
Enum Constant Detail
-
CSV
public static final MatrixFormat CSV
Comma-separated value format (dense).
-
IJV
public static final MatrixFormat IJV
(I J V) format (sparse). I and J represent matrix coordinates and V represents the value. The I J and V values are space-separated.
-
DF_DOUBLES_WITH_INDEX
public static final MatrixFormat DF_DOUBLES_WITH_INDEX
DataFrame of doubles with a row index.
-
DF_DOUBLES
public static final MatrixFormat DF_DOUBLES
DataFrame of doubles with no row index.
-
DF_VECTOR_WITH_INDEX
public static final MatrixFormat DF_VECTOR_WITH_INDEX
Vector DataFrame with a row index.
-
DF_VECTOR
public static final MatrixFormat DF_VECTOR
Vector DataFrame with no row index.
-
-
Method Detail
-
values
public static MatrixFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MatrixFormat c : MatrixFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MatrixFormat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
isVectorBased
public boolean isVectorBased()
Is the matrix format vector-based?- Returns:
trueif matrix is a vector-based DataFrame,falseotherwise.
-
hasIDColumn
public boolean hasIDColumn()
Does the DataFrame have a row index?- Returns:
trueif the DataFrame has a row index,falseotherwise.
-
-