Provides constants for different metrics used in KMeansClustering and kMeansClustering.
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.DistanceMetric
Constants
Specifies the euclidean distance metric or L² metric.
Remarks
This is calculated by
sqrt((p1.x - p2.x)^2 + (p1.y - p2.y)^2)
.When this value is set to the metric property, it has the same effect as the EUCLIDEAN_SQUARED value.
Static Methods
Converts the argument to DistanceMetric.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - DistanceMetric
- The value to convert to DistanceMetric.
Returns
- ↪DistanceMetric
- Either
value
if it is already a DistanceMetric or an appropriate converted value.