public enum DistanceMetric extends Enum<DistanceMetric>
Enum Constant and Description |
---|
EUCLIDEAN
The Euclidean distance metric, also known as straight line distance.
|
HAVERSINE
The Haversine distance metric, which measures the shortest distance between two points on the
surface of a sphere.
|
SPHEROID
The Spheroid distance metric, which measures the shortest distance between two points on the
surface of a spheroid.
|
Modifier and Type | Method and Description |
---|---|
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 EUCLIDEAN
public static final DistanceMetric HAVERSINE
public static final DistanceMetric SPHEROID
public static DistanceMetric[] values()
for (DistanceMetric c : DistanceMetric.values()) System.out.println(c);
public static DistanceMetric 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 nullCopyright © 2025 The Apache Software Foundation. All rights reserved.