public enum DistanceMetric extends Enum<DistanceMetric>
Enum Constant and Description |
---|
CHEBYCHEV
A specifier for Chebychev distance metric.
|
EUCLIDEAN
A specifier for euclidean distance metric.
|
EUCLIDEAN_SQUARED
A specifier for euclidean squared distance metric.
|
MANHATTAN
A specifier for Manhattan distance metric.
|
Modifier and Type | Method and Description |
---|---|
static DistanceMetric |
fromOrdinal(int ordinal) |
int |
value() |
static DistanceMetric |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DistanceMetric[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DistanceMetric CHEBYCHEV
public static final DistanceMetric EUCLIDEAN
public static final DistanceMetric EUCLIDEAN_SQUARED
public static final DistanceMetric MANHATTAN
public static final DistanceMetric fromOrdinal(int ordinal)
public int value()
public static DistanceMetric valueOf(String name)
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullname
- the name of the enum constant to be returned.public static DistanceMetric[] values()
for (DistanceMetric c : DistanceMetric.values()) System.out.println(c);