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 CSV
Comma-separated value format (dense).DF_DOUBLES
DataFrame of doubles with no row index.DF_DOUBLES_WITH_INDEX
DataFrame of doubles with a row index.DF_VECTOR
Vector DataFrame with no row index.DF_VECTOR_WITH_INDEX
Vector 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 boolean
hasIDColumn()
Does the DataFrame have a row index?boolean
isVectorBased()
Is the matrix format vector-based?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.
-
-
-
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:
true
if matrix is a vector-based DataFrame,false
otherwise.
-
hasIDColumn
public boolean hasIDColumn()
Does the DataFrame have a row index?- Returns:
true
if the DataFrame has a row index,false
otherwise.
-
-