public class EuclideanDistance extends Object implements DistanceMeasure
Constructor and Description |
---|
EuclideanDistance() |
Modifier and Type | Method and Description |
---|---|
double |
compute(Vector a,
double[] b)
Compute the distance between n-dimensional vector and n-dimensional array.
|
double |
compute(Vector a,
Vector b)
Compute the distance between two n-dimensional vectors.
|
boolean |
equals(Object obj) |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
readExternal, writeExternal
public double compute(Vector a, Vector b) throws CardinalityException
The two vectors are required to have the same dimension.
compute
in interface DistanceMeasure
a
- The first vector.b
- The second vector.CardinalityException
- if the array lengths differ.public double compute(Vector a, double[] b) throws CardinalityException
The two data structures are required to have the same dimension.
compute
in interface DistanceMeasure
a
- The vector.b
- The array.CardinalityException
- if the data structures lengths differ.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.12.0 Release Date : January 10 2022