public enum DataTypeUtil extends java.lang.Enum<DataTypeUtil>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.math.linear.RealVector |
convert(org.apache.pig.data.Tuple t,
int dim)
Convert a tuple t into a RealVector of dimension dim.
|
static boolean |
isValidVector(org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema inputSchema,
int dimension) |
static DataTypeUtil |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataTypeUtil[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataTypeUtil INSTANCE
public static DataTypeUtil[] values()
for (DataTypeUtil c : DataTypeUtil.values()) System.out.println(c);
public static DataTypeUtil valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic org.apache.commons.math.linear.RealVector convert(org.apache.pig.data.Tuple t, int dim) throws org.apache.pig.PigException
t
- The tuple to convert to a vectordim
- The dimension of the vectororg.apache.pig.PigException
- PigExceptionpublic static boolean isValidVector(org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema inputSchema, int dimension)